0

I have internationalization on:

LANGUAGE_CODE = 'de_AT'
USE_I18N = True
USE_L10N = True

When the admin views the form for a model:

  • On the first request a DateTime field is shown in the correct format. But saving gives a format violation.
  • After a reload, the DateTime field is shown in US format. Saving then works.

Any hints, where to look further?

Version infos: Django==1.7 django-grappelli==2.6.1 django-mptt==0.6.1 psycopg2==2.5.4 pytz==2014.7 wsgiref==0.1.2 xlrd==0.9.3

dev langer
  • 202
  • 1
  • 11
  • 1
    This will help you http://stackoverflow.com/questions/1513502/django-how-to-format-a-datefields-date-representation – Cherif KAOUA Oct 08 '14 at 18:27

1 Answers1

0
DATE_INPUT_FORMATS = (
    '%d.%m.%Y', '%d.%m.%Y', '%d.%m.%y',  # '25.10.2006', '25.10.2006', '25.10.06'
    '%d-%m-%Y', '%d/%m/%Y', '%d/%m/%y',  # '25-10-2006', '25/10/2006', '25/10/06'
    '%d %b %Y',  # '25 Oct 2006', 
    '%d %B %Y',  # '25 October 2006', 
)

in settings.py solves the problem.

dev langer
  • 202
  • 1
  • 11