summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/blog/models.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/app/blog/models.py b/app/blog/models.py
index bf319ce..34f234c 100644
--- a/app/blog/models.py
+++ b/app/blog/models.py
@@ -53,20 +53,31 @@ class PostImage(models.Model):
class Entry(models.Model):
title = models.CharField(max_length=200)
slug = models.SlugField(unique_for_date='pub_date')
+ lede = models.TextField(blank=True)
body_html = models.TextField(blank=True)
body_markdown = models.TextField()
dek = models.TextField(null=True,blank=True)
pub_date = models.DateTimeField('Date published')
- enable_comments = models.BooleanField(default=False)
+ enable_comments = models.BooleanField(default=True)
point = models.PointField(null=True, blank=True)
- location = models.ForeignKey(Location, null=True, blank=True)
+ location = models.ForeignKey(Location, null=True)
+ region = models.ForeignKey(Region, null=True)
status = models.IntegerField(choices=PUB_STATUS, default=0)
photo_gallery = models.ForeignKey(PhotoGallery, blank=True, null=True, verbose_name='photo set')
image = models.FileField(upload_to=get_upload_path, null=True,blank=True)
+ image_height = models.CharField(max_length=20, null=True,blank=True)
+ image_width = models.CharField(max_length=20, null=True,blank=True)
thumbnail = models.FileField(upload_to=get_tn_path, null=True,blank=True)
+ thumb_height = models.CharField(max_length=20, null=True,blank=True)
+ thumb_width = models.CharField(max_length=20, null=True,blank=True)
meta_description = models.CharField(max_length=256, null=True, blank=True)
+ topics = models.ManyToManyField(Topic, blank=True)
template_name = models.IntegerField(choices=TEMPLATES, default=0)
-
+ location_name = models.CharField(max_length=200, null=True,blank=True)
+ state_name = models.CharField(max_length=200, null=True,blank=True)
+ country_name = models.CharField(max_length=200, null=True,blank=True)
+ state_iso = models.CharField(max_length=2, null=True,blank=True)
+ country_iso = models.CharField(max_length=2, null=True,blank=True)
class Meta:
ordering = ('-pub_date',)
get_latest_by = 'pub_date'