From c9c378e2d6de60dc6294fe4ebaaf30bb491421f4 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 6 Dec 2020 16:51:49 +0100 Subject: [PATCH] Change display date format --- articles/context_processors.py | 2 +- articles/templates/articles/article_list.html | 6 +----- articles/templates/articles/datetime_snippet.html | 5 +++++ articles/templates/articles/metadata_snippet.html | 6 +----- 4 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 articles/templates/articles/datetime_snippet.html diff --git a/articles/context_processors.py b/articles/context_processors.py index 5afecf8..a97a56b 100644 --- a/articles/context_processors.py +++ b/articles/context_processors.py @@ -23,7 +23,7 @@ def drafts_count(request): def date_format(request): if request.path in IGNORED_PATHS: return {} - return {"CUSTOM_ISO": r"Y-m-d\TH:i:sO"} + return {"CUSTOM_ISO": r"Y-m-d\TH:i:sO", "ISO_DATE": "Y-m-d"} def git_version(request): diff --git a/articles/templates/articles/article_list.html b/articles/templates/articles/article_list.html index e34e829..2a72a68 100644 --- a/articles/templates/articles/article_list.html +++ b/articles/templates/articles/article_list.html @@ -9,11 +9,7 @@