aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--piccast/feeds/models.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/piccast/feeds/models.py b/piccast/feeds/models.py
index 0ec24f1..1ecd20e 100644
--- a/piccast/feeds/models.py
+++ b/piccast/feeds/models.py
@@ -27,7 +27,10 @@ class Pic(models.Model):
is_nsfw = models.NullBooleanField(null=True, blank=True)
def __unicode__(self):
- return self.title
+ if len(self.title) > 64:
+ return self.title[:61] + "..."
+ else:
+ return self.title
def serializable(self):
return {'id': self.id,
@@ -103,7 +106,10 @@ class PicSet(models.Model):
is_valid = models.BooleanField(default=True);
def __unicode__(self):
- return self.title
+ if len(self.title) > 64:
+ return self.title[:61] + "..."
+ else:
+ return self.title
class Meta:
get_latest_by = "created"