Add property to return the negative id of a listgroup

This is used so we can reference the group as a negative id number from
a template, which is the standard way we separate it from lists when
included in the same dropdowns.
This commit is contained in:
Magnus Hagander
2011-12-03 12:58:57 +01:00
parent 7ffc80c120
commit efbe9fc843

View File

@ -8,6 +8,10 @@ class MailingListGroup(PgModel, models.Model):
purge_urls = ('/community/lists/', )
@property
def negid(self):
return -self.id
def __unicode__(self):
return self.groupname