aboutsummaryrefslogtreecommitdiffstats
path: root/ryuslash/aggregator/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ryuslash/aggregator/models.py')
-rw-r--r--ryuslash/aggregator/models.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ryuslash/aggregator/models.py b/ryuslash/aggregator/models.py
index 3ca7df2..9a39600 100644
--- a/ryuslash/aggregator/models.py
+++ b/ryuslash/aggregator/models.py
@@ -1,5 +1,7 @@
from django.db import models
+CATEGORIES = ['post', 'activity']
+
class Feed(models.Model):
name = models.CharField(max_length=300)
@@ -9,8 +11,9 @@ class Feed(models.Model):
uses_markdown = models.BooleanField()
uses_titles = models.BooleanField()
convert_newlines = models.BooleanField()
- category = models.SmallIntegerField(choices=((0, 'post'),
- (1, 'activity')))
+ category = models.SmallIntegerField(
+ choices=[(CATEGORIES.index(c), c) for c in CATEGORIES]
+ )
def __unicode__(self):
return self.name