python - Change/adapt date widget on admin interface -
I'm configuring the admin site for my new app, and I found a small problem with my setup.
I have a 'Date of Birth' field on my database through the administrator's site, but, that day widget is not very easy, because it builds, if I have to login, 01-04- 1956 widget, I have to be a page for many years Besides, I do not want people to write completely in an edit box altogether, because dash or slash is always used as a separator, or European, Amer Date of commencement in Asian or Asian format ...
Maggiever (What do I mean) What to do?
Use the option to use a different widget. For example (untested):
class MyModelAdmin (admin.ModelAdmin): formfield_overrides = {models.DateField: {'widget': forms.TextInput},} Then you will need to date conversion / verification.
Comments
Post a Comment