aboutsummaryrefslogtreecommitdiffstats
path: root/piccast/feeds/models.py
diff options
context:
space:
mode:
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),