#28403: Improve the example for FORMAT_MODULE_PATH and add missing formats
--------------------------------------+------------------------------------
     Reporter:  karyon                |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  1.11
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by karyon):

 to be specific, with "locale path" i meant the
 [https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths
 LOCALE_PATHS setting] as far as i understand, the [
 
https://github.com/django/django/blob/550cb3a365dee4edfdd1563224d5304de2a57fda/django/utils/formats.py#L62
 code for determining the format locale locations] does not look into
 LOCALE_PATHS. so yes, as far as i understand one has to specify
 FORMAT_MODULE_PATH besides LOCALE_PATHS.

 i'm using LOCALE_PATHS for translations. initially i though that any
 project using FORMAT_MODULE_PATH also has translations and therefore uses
 LOCALE_PATHS anyways, but from a quick github search that doesn't seem to
 be the case. so now i wouldn't replace {{{formats}}} by {{{locale}}}, but
 rather simply mention that the locale structure can be used.

 actually from my point of view it would make sense to merge these
 settings. you specify where the locales are, and in there there might be
 translations and/or formats. or, one could at least make
 FORMAT_MODULE_PATH look into LOCALE_PATHS by default. however, the former
 is a python path while the latter is a normal path with slashes. but
 maybe, since this has been like that for 8 years according to git blame,
 maybe this doesn't need fixing :)
 
https://github.com/django/django/blob/550cb3a365dee4edfdd1563224d5304de2a57fda/django/utils/formats.py#L62

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28403#comment:2>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.f9ba5f738fbac291261b5492961ca51e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to