comparison 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
comparison
equal deleted inserted replaced
999:8386a8ebcbc7 1000:abd4c02aefdb
58 self.date_submitted = datetime.datetime.now() 58 self.date_submitted = datetime.datetime.now()
59 self.update_date = self.date_submitted 59 self.update_date = self.date_submitted
60 else: 60 else:
61 self.update_date = datetime.datetime.now() 61 self.update_date = datetime.datetime.now()
62 62
63 self.short_text = kwargs.pop('short_text', '') 63 if self.version >= 2:
64 if not self.short_text and self.short_markup: 64 self.short_text = kwargs.pop('short_text', '')
65 self.short_text = site_markup(self.short_markup) 65 if not self.short_text and self.short_markup:
66 self.short_text = site_markup(self.short_markup)
66 67
67 self.long_text = kwargs.pop('long_text', '') 68 self.long_text = kwargs.pop('long_text', '')
68 if not self.long_text and self.long_markup: 69 if not self.long_text and self.long_markup:
69 self.long_text = site_markup(self.long_markup) 70 self.long_text = site_markup(self.long_markup)
70 71
71 super(StoryBase, self).save(*args, **kwargs) 72 super(StoryBase, self).save(*args, **kwargs)
72 73
73 74
74 class PendingStory(StoryBase): 75 class PendingStory(StoryBase):