summaryrefslogtreecommitdiff
path: root/apps/blog/models.py
diff options
context:
space:
mode:
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)