Use locale fr for datetime picker
This commit is contained in:
parent
830221f9b9
commit
316f615484
4 changed files with 8 additions and 5 deletions
|
@ -44,7 +44,8 @@ class RefundFormPublic(RefundForm):
|
|||
date = forms.DateField(
|
||||
widget=DateTimePicker(
|
||||
options={
|
||||
'format': 'YYYY-MM-DD'
|
||||
'format': 'YYYY-MM-DD',
|
||||
"locale": "fr",
|
||||
}
|
||||
)
|
||||
)
|
||||
|
@ -57,7 +58,8 @@ class PaymentForm(forms.ModelForm):
|
|||
widgets = {
|
||||
'date': DateTimePicker(
|
||||
options={
|
||||
"format": "YYYY-MM-DD"
|
||||
'format': 'YYYY-MM-DD',
|
||||
"locale": "fr",
|
||||
}
|
||||
),
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{% block javascript %}
|
||||
{{ block.super }}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.2/moment-with-locales.min.js"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"
|
||||
crossorigin="anonymous"></script>
|
||||
|
|
|
@ -129,9 +129,9 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.9/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = os.getenv('DJANGO_LOCALE', 'en-us')
|
||||
LANGUAGE_CODE = os.getenv('DJANGO_LOCALE', 'fr-fr')
|
||||
|
||||
TIME_ZONE = os.getenv('DJANGO_TIMEZONE', 'UTC')
|
||||
TIME_ZONE = os.getenv('DJANGO_TIMEZONE', 'Europe/Paris')
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
|
|
|
@ -5,4 +5,5 @@ django-crispy-forms==1.6.0
|
|||
django-dotenv==1.4.1
|
||||
gunicorn==19.6.0
|
||||
psycopg2==2.6.2
|
||||
pytz
|
||||
whitenoise==3.2.1
|
||||
|
|
Loading…
Reference in a new issue