# HG changeset patch # User Brian Neal # Date 1448427318 21600 # Node ID abd4c02aefdb7934bce4be8b6f5d0759530fb24c # Parent 8386a8ebcbc7958a47fe60578bff679277e70962 News V2.0 WIP template tweaks. diff -r 8386a8ebcbc7 -r abd4c02aefdb news/models.py --- 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) diff -r 8386a8ebcbc7 -r abd4c02aefdb sg101/templates/news/story.html --- a/sg101/templates/news/story.html Sat Nov 21 14:53:29 2015 -0600 +++ b/sg101/templates/news/story.html Tue Nov 24 22:55:18 2015 -0600 @@ -30,6 +30,7 @@ class="news-icon" /> {{ story.short_text|safe }} {{ story.long_text|safe }} + {{ story.admin_content|safe }}

diff -r 8386a8ebcbc7 -r abd4c02aefdb sg101/templates/news/story_summary.html --- a/sg101/templates/news/story_summary.html Sat Nov 21 14:53:29 2015 -0600 +++ b/sg101/templates/news/story_summary.html Tue Nov 24 22:55:18 2015 -0600 @@ -17,6 +17,9 @@

{{ story.short_text|safe }}
+{% if story.admin_content %} + {{ story.admin_content|safe }} +{% endif %} {% if story.long_text %}

Read More