#10603: DateField DEFAULT_DATE_INPUT_FORMATS
-------------------------------------------------------+--------------------
 Reporter:  pcicman                                    |       Owner:  nobody   
 
   Status:  new                                        |   Milestone:           
 
Component:  Forms                                      |     Version:  SVN      
 
 Keywords:  forms date time datetime format templates  |       Stage:  
Unreviewed
Has_patch:  0                                          |  
-------------------------------------------------------+--------------------
 Wouldn't it be better to move DEFAULT_DATE_INPUT_FORMATS to settings.py?

 DEFAULT_DATE_INPUT_FORMATS doesn't match for most European Countries, so
 only one way how to change it is putting format for every form field
 through input_formats argument, what's just not so nice.

 Second problem is output (display) format of Date field. I think its
 similar to #3672. It just doesn't care of INPUT_FORMAT because its not
 implemented.

 There are actually some formats available in settings.py, eg:

 DATE_FORMAT = 'd.m.Y'
 DATETIME_FORMAT = 'd.m.Y H:i'
 TIME_FORMAT = 'H:i'
 YEAR_MONTH_FORMAT = 'F Y'
 MONTH_DAY_FORMAT = 'j. F'

 which doesn't really make much sense.

 == PROPOSAL ==

 Can't be this settings just combined together to one default
 date/time/datetime formats, which will be used for all date/time
 input/display?

 In this case eg DATE_FORMAT can stay in settings.py, but should may be
 changed to tuple, which will contain one or more formats. For input, all
 formats will be available, for output will be by default taken the very
 first format.

 I think this will make sense also for international pages, where will be
 still possible to provide different settings for different
 country/language/...

 __unicode__ for date/time then can also return right output string
 (formated). This may be very useful for rendering date/time in template.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10603>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to