Ticket #3740: models.py

File models.py, 560 bytes (added by anonymous, 18 years ago)

contains only the "Alias"-model which triggers the bug

Line 
1class Alias(models.Model):
2 address = models.CharField(maxlength=255, blank=True, null=True)
3 domain = models.ForeignKey(Domain)
4 enabled = models.BooleanField('Enabled',default=True)
5 recipients = models.ManyToManyField(Recipient, filter_interface=models.HORIZONTAL)
6
7 def __str__(self):
8 return "%s@%s" % (self.address, self.domain.name)
9
10 class Meta:
11 ordering = ('domain', 'address')
12
13 class Admin:
14 list_display = ('__str__', 'enabled')
15 list_filter = ('domain',)
16 ordering = ('domain', 'address')
17
Back to Top