#28075: USE_THOUSAND_SEPARATOR = True, causes foreignkey id to become localized
---------------------------------+--------------------------------------
     Reporter:  George Tantiras  |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Uncategorized    |                  Version:  1.11
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by George Tantiras):

 In the example, am using the settings.py as it comes with the default
 django installation.
 However, if it might make sense, I have the following files in my project
 tree, for the locales en, el:
 * <project name>formats/en/formats.py, <project name>formats/el/formats.py
 {{{
 DATE_FORMAT = 'd-m-Y'
 TIME_FORMAT = 'H:i'
 DATETIME_FORMAT = 'd-m-Y H:i'
 YEAR_MONTH_FORMAT = 'F Y'
 MONTH_DAY_FORMAT = 'F j'
 SHORT_DATE_FORMAT = 'm/d/Y'
 SHORT_DATETIME_FORMAT = 'm/d/Y P'
 FIRST_DAY_OF_WEEK = 1

 # BUT here use the Python strftime format syntax,
 # LIST: http://docs.python.org/library/datetime.html#strftime-strptime-
 behavior

 DATE_INPUT_FORMATS = (
     '%d-%m-%Y',     # '21-03-2014'
 )
 TIME_INPUT_FORMATS = (
     '%H:%M:%S',     # '17:59:59'
     '%H:%M',        # '17:59'
 )
 DATETIME_INPUT_FORMATS = (
     '%d-%m-%Y %H:%M',     # '21-03-2014 17:59'
 )

 DECIMAL_SEPARATOR = ','
 THOUSAND_SEPARATOR = '.'
 NUMBER_GROUPING = 3
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28075#comment:10>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a2de049a56956619fff2c87d4507701f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to