diff --git a/articles/context_processors.py b/articles/context_processors.py index ed55370..2332c2d 100644 --- a/articles/context_processors.py +++ b/articles/context_processors.py @@ -7,3 +7,7 @@ def pages(request): def drafts_count(request): return {"drafts_count": Article.with_pages.filter(status=Article.DRAFT).count()} + + +def date_format(request): + return {"CUSTOM_ISO": "Y-m-d\TH:i:sO"} diff --git a/articles/templates/articles/comment_snippet.html b/articles/templates/articles/comment_snippet.html index 2ac2681..e608df6 100644 --- a/articles/templates/articles/comment_snippet.html +++ b/articles/templates/articles/comment_snippet.html @@ -5,7 +5,7 @@

{{ comment.username }} | -

{% if article.published_at %} - + {% else %} - + {% endif %} {% include "articles/admin_link_snippet.html" %}

diff --git a/blog/settings.py b/blog/settings.py index ba6da5b..22bbc96 100644 --- a/blog/settings.py +++ b/blog/settings.py @@ -96,6 +96,7 @@ TEMPLATES = [ "django.contrib.messages.context_processors.messages", "articles.context_processors.pages", "articles.context_processors.drafts_count", + "articles.context_processors.date_format", ], }, },