From 1e3850bb6be655564a55cba9fd30d123b2fa61b0 Mon Sep 17 00:00:00 2001 From: Evarin Date: Sun, 14 Oct 2018 15:50:55 +0200 Subject: [PATCH] Nettoyage dates et calendrier --- cof/locale/en/__init__.py | 0 cof/locale/en/formats.py | 11 +++ cof/locale/fr/formats.py | 4 +- gestioncof/cms/templates/cofcms/calendar.html | 6 +- .../templates/cofcms/cof_actu_index_page.html | 3 +- .../cms/templates/cofcms/cof_actu_page.html | 3 +- .../cms/templates/cofcms/cof_root_page.html | 3 +- gestioncof/cms/templatetags/cofcms_tags.py | 75 +++++++++---------- 8 files changed, 54 insertions(+), 51 deletions(-) create mode 100644 cof/locale/en/__init__.py create mode 100644 cof/locale/en/formats.py diff --git a/cof/locale/en/__init__.py b/cof/locale/en/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cof/locale/en/formats.py b/cof/locale/en/formats.py new file mode 100644 index 00000000..9d3bad35 --- /dev/null +++ b/cof/locale/en/formats.py @@ -0,0 +1,11 @@ +# -*- encoding: utf-8 -*- + +""" +Formats français. +""" + +from __future__ import unicode_literals + +DATETIME_FORMAT = r'l N j, Y \a\t P' +DATE_FORMAT = r'l N j, Y' +TIME_FORMAT = r'P' diff --git a/cof/locale/fr/formats.py b/cof/locale/fr/formats.py index 710fa6ed..ae1aaa13 100644 --- a/cof/locale/fr/formats.py +++ b/cof/locale/fr/formats.py @@ -6,4 +6,6 @@ Formats français. from __future__ import unicode_literals -DATETIME_FORMAT = r'l j F Y \à H:i' +DATETIME_FORMAT = r'l j F Y \à H\hi' +DATE_FORMAT = r'l j F Y' +TIME_FORMAT = r'H\hi' diff --git a/gestioncof/cms/templates/cofcms/calendar.html b/gestioncof/cms/templates/cofcms/calendar.html index 02568f0d..a6a9d87e 100644 --- a/gestioncof/cms/templates/cofcms/calendar.html +++ b/gestioncof/cms/templates/cofcms/calendar.html @@ -1,4 +1,4 @@ -{% load wagtailcore_tags wagtailroutablepage_tags static %} +{% load wagtailcore_tags wagtailroutablepage_tags static i18n %} @@ -6,7 +6,7 @@ - + {% blocktrans %}{% endblocktrans %} {% for week in weeks %} {% for day in week %} @@ -14,7 +14,7 @@ {% if day.events %} {{ day.day }}
{{ this_month|date:"F Y" }} >
LMMJVSD
LMMJVSD