Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 830127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:59:35+00:00 2026-05-15T03:59:35+00:00

I have an application in Django 1.2. Language is selectable (I18N and Locale =

  • 0

I have an application in Django 1.2.
Language is selectable (I18N and Locale = True)

When I select the english lang. in the site, the admin works OK. But when I change to any other language this is what happens with date inputs (spanish example):

Correctly, the input accepts the spanish format %d/%m/%Y (Even selecting from the calendar, the date inserts as expected). But when I save the form and load it again, the date shows in the english form: %Y-%m-%d

The real problem is that when I load the form to change any other text field and try to save it I get an error telling me to enter a valid date, so I have to write all dates again or change the language in the site to use the admin.

I haven’t specified anything for DATE_INPUT_FORMATS in settings nor have I overridden forms or models.

Surely I am missing something but I can’t find it. Can anybody give me a hint?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T03:59:36+00:00Added an answer on May 15, 2026 at 3:59 am

    Adding this to your settings should solve the part you call “the real problem”:

    DATE_INPUT_FORMATS = (   
        '%d/%m/%Y', '%d/%m/%y',     # '25/10/2006', '25/10/06'
        '%Y-%m-%d', '%y-%m-%d',     # '2006-10-25', '06-10-25'
    )
    
    DATETIME_INPUT_FORMATS = (
        '%d/%m/%Y %H:%M:%S',    # '25/10/2006 14:30:59'
        '%d/%m/%Y %H:%M',       # '25/10/2006 14:30'
        '%d/%m/%y %H:%M:%S',    # '25/10/06 14:30:59'
        '%d/%m/%y %H:%M',       # '25/10/06 14:30'
        '%Y-%m-%d %H:%M:%S',    # '2006-10-25 14:30:59'
        '%Y-%m-%d %H:%M',       # '2006-10-25 14:30'
        '%Y-%m-%d',             # '2006-10-25'
    )
    

    But it’s a problem with Django. I opened a ticket about the issue, but you should comment, because your example shows it is even more serious problem then I thought it was (because as it turned out not all localization accepts both “universal” and “localized” date input formats).

    Update: I forgot to add that you can pass localize=True to your date widgets, and they are supposed to then always display dates in localized format. There are some examples of how to do this in this bug report.

    I just posted a message about the issue to django-developers mailing list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I need to have multiple language support of my django admin application.I can
I have this form in a Django application In Firefox it works as charm,
I have Django application with inline in place: class Account(models.Model): ContractNum = models.PositiveIntegerField(unique=True, blank=True,
I have a django application set up using mainly the admin interface with a
I have a Django application using django-mssql to communicate w/ SQL Server. This works
HI I have a django application running on app engine and I want to
Is it possible to customize a django application to have accept localized date format
I have set up a Django application that uses images. I think I have
I have two models in my Django application, for the purposes of storing search
I have a many-to-many relationship in my django application where I use the add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.