You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
395 B
16 lines
395 B
from django.db import models
|
|
|
|
# Create your models here.
|
|
class Subscriber(models.Model):
|
|
email = models.EmailField()
|
|
name = models.CharField(max_length=128)
|
|
|
|
class Meta:
|
|
verbose_name = 'MySubsciber'
|
|
verbose_name_plural = 'List of Subscribers'
|
|
|
|
def __str__(self):
|
|
try:
|
|
return self.name
|
|
except:
|
|
return '{0!s}'.format(self.id) |