From 526fbe767130b4dedd75841969808fe750afa22e Mon Sep 17 00:00:00 2001 From: "luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f" Date: Mon, 23 Nov 2009 15:56:35 +0000 Subject: redesign tentatively complete --- apps/blog/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apps/blog/models.py') 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) -- cgit v1.2.3-70-g09d2