summaryrefslogtreecommitdiffstats
path: root/templates/news
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-15 01:47:12 +0200
committerDan McGee <dan@archlinux.org>2010-09-15 01:47:12 +0200
commitb084936ad9a1e5d7edfcfeb3495b997cb2fe368b (patch)
tree59b55c33255b29c9cada1f7b4921811d496304af /templates/news
parent3394a94a4019406b643341771dae057d39af73e3 (diff)
downloadarchweb-b084936ad9a1e5d7edfcfeb3495b997cb2fe368b.tar.gz
archweb-b084936ad9a1e5d7edfcfeb3495b997cb2fe368b.tar.xz
Ensure consistent date formatting everywhere
Set up a default DATE_FORMAT in settings.py and use it everywhere we do the '|date' template filter rather than hardcoding the value in the template. This also fixes a regression with news date/time now that we changed the field to store both date and time. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/news')
-rw-r--r--templates/news/list.html2
-rw-r--r--templates/news/view.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/news/list.html b/templates/news/list.html
index 258456a..14ba79b 100644
--- a/templates/news/list.html
+++ b/templates/news/list.html
@@ -28,7 +28,7 @@
<tbody>
{% for item in news_list %}
<tr class="{% cycle 'odd' 'even' %}">
- <td>{{ item.postdate }}</td>
+ <td>{{ item.postdate|date }}</td>
<td class="wrap"><a href="{{ item.get_absolute_url }}"
title="View: {{ item.title }}">{{ item.title }}</a></td>
<td>{{ item.author.get_full_name }}</td>
diff --git a/templates/news/view.html b/templates/news/view.html
index a7c25a4..1c92fe7 100644
--- a/templates/news/view.html
+++ b/templates/news/view.html
@@ -16,7 +16,7 @@
</ul>
{% endif %}
- <p class="article-info">{{ news.postdate }} - {{ news.author.get_full_name }}</p>
+ <p class="article-info">{{ news.postdate|date }} - {{ news.author.get_full_name }}</p>
<div class="article-content">{{ news.content|markdown }}</div>