Jan Dittberner
5db6223bc0
- generate domains app - duplicate managemails.models.MailDomain as domains.models.MailDomain - add domains app to gnuviechadmin.settings.base.LOCAL_APPS - repair managemails.tests.test_models - fix handling of empty results in osusers.models.GroupManager.get_next_gid and osusers.models.UserManager.get_next_uid
17 lines
487 B
Python
17 lines
487 B
Python
from django.db import models
|
|
from django.utils.encoding import python_2_unicode_compatible
|
|
from django.utils.translation import ugettext as _
|
|
|
|
from model_utils.models import TimeStampedModel
|
|
|
|
|
|
@python_2_unicode_compatible
|
|
class MailDomain(TimeStampedModel, models.Model):
|
|
domain = models.CharField(max_length=128, unique=True)
|
|
|
|
class Meta:
|
|
verbose_name = _('Mail domain')
|
|
verbose_name_plural = _('Mail domains')
|
|
|
|
def __str__(self):
|
|
return self.domain
|