Added the ability to mark a blacklist item's source

This commit is contained in:
2010-10-28 09:39:59 +01:00
parent 012aaa8074
commit 6cc34a9c05
2 changed files with 13 additions and 0 deletions

View File

@@ -51,3 +51,11 @@ BLACKLIST_TYPE_CHOICES = (
(BLACKLIST_TYPE_EMAIL, 'Email Address'),
(BLACKLIST_TYPE_AUTH, 'Auth Account'),
)
BLACKLIST_SOURCE_INTERNAL = 0
BLACKLIST_SOURCE_EXTERNAL = 1
BLACKLIST_SOURCE_CHOICES = (
(BLACKLIST_SOURCE_INTERNAL, 'Internal'),
(BLACKLIST_SOURCE_EXTERNAL, 'External'),
)

View File

@@ -131,6 +131,11 @@ class Blacklist(models.Model):
expiry_date = models.DateTimeField(verbose_name="Expiry Date", blank=False, null=True,
help_text="Date to expire this entry")
source = models.IntegerField(choices=BLACKLIST_SOURCE_CHOICES,
verbose_name="Blacklist Source",
help_text="Source of the blacklisted item",
default=BLACKLIST_SOURCE_INTERNAL)
created_date = models.DateTimeField(auto_now_add=True, verbose_name="Created Date")
created_by = models.ForeignKey(User, blank=False, verbose_name="Created By")