diff news/models.py @ 1000:abd4c02aefdb

News V2.0 WIP template tweaks.
author Brian Neal <bgneal@gmail.com>
date Tue, 24 Nov 2015 22:55:18 -0600
parents 8386a8ebcbc7
children c6c3ba5cf6eb
line wrap: on
line diff
--- a/news/models.py	Sat Nov 21 14:53:29 2015 -0600
+++ b/news/models.py	Tue Nov 24 22:55:18 2015 -0600
@@ -60,13 +60,14 @@
         else:
             self.update_date = datetime.datetime.now()
 
-        self.short_text = kwargs.pop('short_text', '')
-        if not self.short_text and self.short_markup:
-            self.short_text = site_markup(self.short_markup)
+        if self.version >= 2:
+            self.short_text = kwargs.pop('short_text', '')
+            if not self.short_text and self.short_markup:
+                self.short_text = site_markup(self.short_markup)
 
-        self.long_text = kwargs.pop('long_text', '')
-        if not self.long_text and self.long_markup:
-            self.long_text = site_markup(self.long_markup)
+            self.long_text = kwargs.pop('long_text', '')
+            if not self.long_text and self.long_markup:
+                self.long_text = site_markup(self.long_markup)
 
         super(StoryBase, self).save(*args, **kwargs)