Set a default DATE_FORMAT
authorMagnus Hagander <magnus@hagander.net>
Fri, 3 Jul 2020 15:52:33 +0000 (17:52 +0200)
committerMagnus Hagander <magnus@hagander.net>
Fri, 3 Jul 2020 16:05:54 +0000 (18:05 +0200)
We already set DATETIME_FORMAT, but it makes sense to also set
DATE_FORMAT. In all our frontend templates we were already using an
explicit format, but this will help the /admin/ side.

pgweb/settings.py

index 44c02096624779d387fe9bafd1562271e3806cfe..f9782dc047b391ea9672801400f8698610f017f4 100644 (file)
@@ -114,10 +114,12 @@ INSTALLED_APPS = [
     'pgweb.featurematrix',
     'pgweb.search',
     'pgweb.pugs',
+    'pgweb.util',
 ]
 
 # Default format for date/time (as it changes between machines)
 DATETIME_FORMAT = "Y-m-d H:i:s"
+DATE_FORMAT = "Y-m-d"
 
 # Configure recaptcha. Most details contain keys and are thus handled
 # in settings_local.py. Override NOCAPTCHA to actually use them.