1 from django.db import models
2 from django.utils.translation import ugettext_lazy as _
5 class Alias(models.Model):
6 source = models.EmailField(_('source'), db_index=True)
7 destination = models.EmailField(_('destination'))
10 verbose_name = _('alias')
11 verbose_name_plural = _('aliases')
12 ordering = ('source', 'destination')
15 return '{} -> {}'.format(self.source, self.destination)