From: Eric Mc Sween Date: Mon, 18 Jun 2012 15:22:26 +0000 (-0400) Subject: [#3336] Remettre les dates au format dd-mm-yyyy X-Git-Tag: 1.6.5~78^2~9 X-Git-Url: https://git.auf.org/?p=auf_rh_dae.git;a=commitdiff_plain;h=21b8a2dec11174f1546e2b13e2fb4730c1143c34 [#3336] Remettre les dates au format dd-mm-yyyy --- diff --git a/project/formats/__init__.py b/project/formats/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/project/formats/fr/__init__.py b/project/formats/fr/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/project/formats/fr/formats.py b/project/formats/fr/formats.py new file mode 100644 index 0000000..ecb6222 --- /dev/null +++ b/project/formats/fr/formats.py @@ -0,0 +1,7 @@ +THOUSAND_SEPARATOR = u'\xa0' +NUMBER_GROUPING = 3 +DATE_FORMAT = 'd-m-Y' +DATE_INPUT_FORMATS = ( + '%d-%m-%Y', '%d/%m/%Y', '%d %m %Y', +) +SHORT_DATE_FORMAT = 'd-m-Y' diff --git a/project/rh/admin.py b/project/rh/admin.py index 7005ee7..ab79128 100644 --- a/project/rh/admin.py +++ b/project/rh/admin.py @@ -19,11 +19,9 @@ import auf.django.references.models as ref from project.decorators import in_drh_or_admin from project.groups import grp_correspondants_rh from project.groups import get_employe_from_user - import project.rh.models as rh from project.rh.forms import ContratForm, AyantDroitForm, EmployeAdminForm, \ AjaxSelect, DossierForm, ResponsableInlineForm - from project.rh.change_list import ChangeList diff --git a/project/settings.py b/project/settings.py index f0601e9..ef0a311 100644 --- a/project/settings.py +++ b/project/settings.py @@ -16,19 +16,15 @@ ADMINS = ( MANAGERS = ADMINS TIME_ZONE = 'America/Montreal' +LANGUAGE_CODE = 'fr' +FORMAT_MODULE_PATH = 'project.formats' +USE_L10N = True +USE_THOUSAND_SEPARATOR = True DATE_FORMAT = 'd-m-Y' -DATE_INPUT_FORMATS = ( - '%d-%m-%Y', '%d/%m/%Y', '%d %m %Y', -) -SHORT_DATE_FORMAT = 'd-m-Y' SESSION_SAVE_EVERY_REQUEST = True SESSION_EXPIRE_AT_BROWSER_CLOSE = True -LANGUAGE_CODE = 'fr-ca' -USE_L10N = True -USE_THOUSAND_SEPARATOR = True - # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media') @@ -37,8 +33,6 @@ PRIVE_MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media_prive') STATICFILES_DIRS = ( os.path.join(os.path.dirname(__file__), 'assets'), ) - - STATIC_ROOT = os.path.join(os.path.dirname(__file__), 'static') STATIC_URL = '/static/'