瀏覽代碼

[5.0.x] Fixed #35153 -- Added note about locale name notation to FORMAT_MODULE_PATH docs.

Co-authored-by: Paul Hermans <paul.hermans@benemtech.com>

Backport of 9bd849c8d5c587209a231af643a17ec2db802ab2 from main
sandjio 1 年之前
父節點
當前提交
e72fdc850a
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      docs/ref/settings.txt

+ 4 - 0
docs/ref/settings.txt

@@ -1728,6 +1728,10 @@ for project locales. If not ``None``, Django will check for a ``formats.py``
 file, under the directory named as the current locale, and will use the
 formats defined in this file.
 
+The name of the directory containing the format definitions is expected to be
+named using :term:`locale name` notation, for example ``de``, ``pt_BR``,
+``en_US``, etc.
+
 For example, if :setting:`FORMAT_MODULE_PATH` is set to ``mysite.formats``,
 and current language is ``en`` (English), Django will expect a directory tree
 like: