This appears to have become dependent on a django setting that we no
longer set -- and it's best to have a predictable format regardless.
Most things on the frontpage used the standard format, but not news,
leading to an annoyingly inconsistent view.
return True
return False
+ @property
+ def displaydate(self):
+ return self.date.strftime("%Y-%m-%d")
+
class Meta:
ordering = ('-date',)
<div class="pgNewsEventsWrap">
{% for n in news %}
<p>
- <span class="txtDate">{{n.date}}</span> <br/>
+ <span class="txtDate">{{n.displaydate}}</span> <br/>
<a href="/about/news/{{n.id}}/">{{n.title}}</a>
</p>
{% endfor %}
{%block title%}{{obj.title}}{%endblock%}
{%block contents%}
<h1>{{obj.title}}</h1>
-<div class="newsdate">Posted on <b>{{obj.date}}</b></div>
+<div class="newsdate">Posted on <b>{{obj.displaydate}}</b></div>
{{obj.content|markdown}}
{%if obj.is_migrated%}
<p><i>This post has been migrated from a previous version of the PostgreSQL
<h1>News archive</h1>
{%for obj in news %}
<h2><a href="/about/news/{{obj.id}}/">{{obj.title}}</a></h2>
-<div class="newsdate">Posted on <b>{{obj.date}}</b></div>
+<div class="newsdate">Posted on <b>{{obj.displaydate}}</b></div>
{{obj.content|markdown|striptags|truncatewords:20}}
{%endfor%}
<p><a href="/account/news/new/">Submit news</a></p>