summaryrefslogtreecommitdiff
path: root/apps/blog/models.py
diff options
context:
space:
mode:
authorluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2009-11-23 15:56:35 +0000
committerluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2009-11-23 15:56:35 +0000
commit526fbe767130b4dedd75841969808fe750afa22e (patch)
treedae304cd7c26f58de184366998692f4007d18db5 /apps/blog/models.py
parent4ac2e8c9c7126e21c708fd04bc14cf8143e1c17f (diff)
redesign tentatively complete
Diffstat (limited to 'apps/blog/models.py')
-rw-r--r--apps/blog/models.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/blog/models.py b/apps/blog/models.py
index 7ad415c..5ff6624 100644
--- a/apps/blog/models.py
+++ b/apps/blog/models.py
@@ -55,7 +55,7 @@ class Entry(models.Model):
status = models.IntegerField(choices=PUB_STATUS, default=0)
photo_gallery = models.ForeignKey(PhotoGallery, blank=True, null=True, verbose_name='photo set')
thumbnail = models.FileField(upload_to=get_upload_path, null=True,blank=True)
- title_keywords = models.CharField(max_length=200)
+ title_keywords = models.CharField(max_length=200, null=True, blank=True)
class Meta:
ordering = ('-pub_date',)
@@ -81,7 +81,10 @@ class Entry(models.Model):
return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date
def get_thumbnail_url(self):
- return '%s%s' %(settings.IMAGES_URL, self.thumbnail.url[33:])
+ if settings.DEVELOPMENT == True:
+ return '%s%s' %(settings.IMAGES_URL, self.thumbnail.url[35:])
+ else:
+ return '%s%s' %(settings.IMAGES_URL, self.thumbnail.url[33:])
def save(self):
html,lede = markdown_processor(self.body_markdown)