Group the snip code so it appears correctly.
author |
Steve Losh <steve@stevelosh.com> |
date |
Sun, 23 Aug 2009 08:55:31 -0400 |
parents |
dbf5fe560ec3
|
children |
358d0b9cc0aa
|
branches/tags |
(none) |
files |
blog/models.py projects/models.py |
Changes
--- a/blog/models.py Sat Aug 22 10:17:28 2009 -0400
+++ b/blog/models.py Sun Aug 23 08:55:31 2009 -0400
@@ -37,5 +37,5 @@
return u'%s on %s' % (self.name, self.entry.title)
def snip(self):
- return self.body[:40] + '...' if len(self.body) > 40 else ''
+ return self.body[:40] + ('...' if len(self.body) > 40 else '')
--- a/projects/models.py Sat Aug 22 10:17:28 2009 -0400
+++ b/projects/models.py Sun Aug 23 08:55:31 2009 -0400
@@ -34,6 +34,6 @@
return u'%s on %s' % (self.name, self.project.name)
def snip(self):
- return self.body[:40] + '...' if len(self.body) > 40 else ''
+ return self.body[:40] + ('...' if len(self.body) > 40 else '')