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.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/ryuslash/aggregator/models.py b/ryuslash/aggregator/models.py
index ac3d278..3ca7df2 100644
--- a/ryuslash/aggregator/models.py
+++ b/ryuslash/aggregator/models.py
@@ -1,14 +1,30 @@
from django.db import models
+
+class Feed(models.Model):
+ name = models.CharField(max_length=300)
+ base_url = models.URLField()
+ feed_url = models.CharField(max_length=100)
+ favicon_ext = models.CharField(max_length=10, default='ico')
+ uses_markdown = models.BooleanField()
+ uses_titles = models.BooleanField()
+ convert_newlines = models.BooleanField()
+ category = models.SmallIntegerField(choices=((0, 'post'),
+ (1, 'activity')))
+
+ def __unicode__(self):
+ return self.name
+
+
class Post(models.Model):
post_id = models.CharField(max_length=255, unique=True,
primary_key=True)
title = models.CharField(max_length=500, blank=True)
- category = models.CharField(max_length=255)
link = models.URLField(max_length=255)
updated = models.DateTimeField()
content = models.TextField()
icon = models.CharField(max_length=255)
+ feed = models.ForeignKey(Feed)
class Meta:
- ordering = [ '-updated' ]
+ ordering = ['-updated']