Skip to content
Snippets Groups Projects
Verified Commit 5c476cba authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Configure locale-based date formatting

parent b39158a1
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,11 @@ SLUGIFY_SOURCE = "basename"
TIMEZONE = "Europe/Berlin"
DEFAULT_LANG = "de"
DEFAULT_DATE_FORMAT = "%x"
DATE_FORMATS = {
"de": "%A, %d. %B %Y",
"en": "%A, %Y-%m-%d",
}
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
......
......@@ -10,12 +10,12 @@
{% if article.source_link %}
{# This is a webring article #}
<h2><a href="{{ article.link }}">{{ article.title }}</a></h2>
<p>{{ article.date|strftime('%Y-%m-%d') }} · <a href="{{ article.author_detail.href }}">{{ article.author_detail.name }}</a> · <a href="{{ article.source_link }}">{{ article.source_title }}</a></p>
<p>{{ article.date }} · <a href="{{ article.author_detail.href }}">{{ article.author_detail.name }}</a> · <a href="{{ article.source_link }}">{{ article.source_title }}</a></p>
{{ article.description }}
{% else %}
{# This is a local article #}
<h2><a href="{{ article.url }}">{{ article.title }}</a></h2>
<p>{{ article.date|strftime('%Y-%m-%d') }} · <a href="{{ article.author.url }}">{{ article.author }}</a></p>
<p>{{ article.date }} · <a href="{{ article.author.url }}">{{ article.author }}</a></p>
{{ article.summary }}
{% endif %}
{% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment