aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2011-05-11 22:48:42 -0400
committerbnewbold <bnewbold@robocracy.org>2011-05-11 22:48:42 -0400
commit5fbd142dddd6b364d6d22a1c027057aa5d9d9e6e (patch)
tree6fc06c839b1ba4476668574b196a6690daf3e8b6
parent3fa63e1b2285b273d469f3d00421ddd5a548bd7f (diff)
downloadpiccast-5fbd142dddd6b364d6d22a1c027057aa5d9d9e6e.zip
piccast-5fbd142dddd6b364d6d22a1c027057aa5d9d9e6e.tar.gz
truncated titles (mostly for butdoesitfloat)
-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"