add verbose name to MailAddress fields

This commit is contained in:
Jan Dittberner 2015-01-25 19:01:01 +01:00
parent f9ce3929f7
commit af27400077
2 changed files with 28 additions and 2 deletions

View file

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('managemails', '0003_auto_20150124_2029'),
]
operations = [
migrations.AlterField(
model_name='mailaddress',
name='domain',
field=models.ForeignKey(verbose_name='domain', to='domains.MailDomain'),
preserve_default=True,
),
migrations.AlterField(
model_name='mailaddress',
name='localpart',
field=models.CharField(max_length=128, verbose_name='local part'),
preserve_default=True,
),
]

View file

@ -118,8 +118,8 @@ class MailAddress(ActivateAbleMixin, TimeStampedModel, models.Model):
This is the model class for a mail address.
"""
localpart = models.CharField(max_length=128)
domain = models.ForeignKey(MailDomain)
localpart = models.CharField(_('local part'), max_length=128)
domain = models.ForeignKey(MailDomain, verbose_name=_('domain'))
class Meta:
ordering = ['domain', 'localpart']