How to accept localized date format (e.g dd/mm/yy) in a DateField on an admin form ?
- by tomjerry
Is it possible to customize a django application to have accept localized date format (e.g dd/mm/yy) in a DateField on an admin form ?
I have a model class :
class MyModel(models.Model):
date = models.DateField("Date")
And associated admin class
class MyModelAdmin(admin.ModelAdmin):
pass
On django administration interface, I would like to be able to input a date in following format : dd/mm/yyyy. However, the date field in the admin form expects yyyy-mm-dd.
How can I customize things ? Nota bene : I have already specified my custom language code (fr-FR) in settings.py, but it seems to have no effect on this date input matter.
Thanks in advance for your answer