aboutsummaryrefslogtreecommitdiffstats
path: root/piccast/feeds/models.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2011-04-27 20:23:42 -0400
committerbnewbold <bnewbold@robocracy.org>2011-04-27 20:26:17 -0400
commitc0394f2461854b2735aa5ff7b5435b5bc1978498 (patch)
tree56949faf4d5072a4d18fea46f845655ab4b57768 /piccast/feeds/models.py
parent309dfaef522a3861fdaae4bddad8197db1c98984 (diff)
downloadpiccast-c0394f2461854b2735aa5ff7b5435b5bc1978498.zip
piccast-c0394f2461854b2735aa5ff7b5435b5bc1978498.tar.gz
a few small todo items
- add 3 more categories of pics from acidcow: celebs, girls, and cars - add favicon url field to PicFeed - credits/license field for Pic and PicSet - sort json/sets_by_feed (most recent first) - add 'is_active' mechanism to disable feeds w/o deleting
Diffstat (limited to 'piccast/feeds/models.py')
-rw-r--r--piccast/feeds/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/piccast/feeds/models.py b/piccast/feeds/models.py
index cf8fc77..716bd78 100644
--- a/piccast/feeds/models.py
+++ b/piccast/feeds/models.py
@@ -23,6 +23,7 @@ class Pic(models.Model):
original_width = models.PositiveIntegerField(null=True,blank=True)
source_url = models.URLField(blank=True)
caption = models.TextField(blank=True)
+ credits = models.TextField(blank=True)
is_nsfw = models.NullBooleanField(null=True, blank=True)
def __unicode__(self):
@@ -39,6 +40,7 @@ class Pic(models.Model):
'original_width': self.original_width,
'source_url': self.source_url,
'caption': self.caption,
+ 'credits': self.credits,
'is_nsfw': self.is_nsfw,
}
@@ -48,6 +50,7 @@ class Pic(models.Model):
'original_url': self.original_url,
'original_height': self.original_height,
'original_width': self.original_width,
+ 'credits': self.credits,
}
class PicFeed(models.Model):
@@ -56,6 +59,8 @@ class PicFeed(models.Model):
shortname = models.SlugField(blank=False)
source_url = models.URLField(blank=True)
rssfeed_url = models.URLField(blank=True)
+ favicon_url = models.URLField(blank=True)
+ is_active = models.BooleanField(default=False)
title = models.CharField(max_length=80, blank=True)
description = models.TextField(blank=True)
image = models.ForeignKey('feeds.Pic', blank=True, null=True)
@@ -71,6 +76,7 @@ class PicFeed(models.Model):
'shortname': self.shortname,
'source_url': self.source_url,
'rssfeed_url': self.rssfeed_url,
+ 'favicon_url': self.favicon_url,
'title': self.title,
'description': self.description,
'image':
@@ -85,6 +91,7 @@ class PicSet(models.Model):
source_url = models.URLField(blank=True)
title = models.CharField(max_length=128, blank=False)
description = models.TextField(blank=True)
+ credits = models.TextField(blank=True)
keywords = models.CharField(max_length=256, blank=True)
image = models.ForeignKey('feeds.Pic', null=True,blank=True)
feed = models.ForeignKey('feeds.PicFeed', null=True,blank=False)
@@ -101,6 +108,7 @@ class PicSet(models.Model):
'source_url': self.source_url,
'title': self.title,
'description': self.description,
+ 'credits': self.credits,
'keywords': self.keywords,
'image':
(self.image.serializable_short() if self.image else None),