diff options
author | luxagraf <sng@luxagraf.net> | 2013-05-15 21:29:20 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2013-05-15 21:29:20 -0400 |
commit | c699779d07ef9cdb6e520836a7bde4d8418dcec8 (patch) | |
tree | 80b6ef1b87f5005171fddda5349959226fd2b930 /app/blog/models.py | |
parent | f6f204876e20b0b7e9c05faa927967cbc2142315 (diff) |
reversion done, data migrated, new model structure headed live...
Diffstat (limited to 'app/blog/models.py')
-rw-r--r-- | app/blog/models.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/app/blog/models.py b/app/blog/models.py index 34f234c..bf319ce 100644 --- a/app/blog/models.py +++ b/app/blog/models.py @@ -53,31 +53,20 @@ 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=True) + enable_comments = models.BooleanField(default=False) point = models.PointField(null=True, blank=True) - location = models.ForeignKey(Location, null=True) - region = models.ForeignKey(Region, null=True) + location = models.ForeignKey(Location, null=True, blank=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' |