diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-10-02 20:45:19 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-10-15 17:15:41 -0400 |
| commit | 0cd465b63aa7c03a3d14bd5fd6543628d585f8da (patch) | |
| tree | 99adcb585573d78d5cc01c9b9466073dbe988449 /docs/ref | |
| parent | 99d4fc18bdb8110147165531d348be53529eece5 (diff) | |
Fixed #29817 -- Deprecated settings.FILE_CHARSET.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/django-admin.txt | 3 | ||||
| -rw-r--r-- | docs/ref/settings.txt | 8 | ||||
| -rw-r--r-- | docs/ref/unicode.txt | 11 |
3 files changed, 12 insertions, 10 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 1a3baecfda..1323d1292c 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -613,8 +613,7 @@ the :ref:`i18n documentation <how-to-create-language-files>` for details. This command doesn't require configured settings. However, when settings aren't configured, the command can't ignore the :setting:`MEDIA_ROOT` and -:setting:`STATIC_ROOT` directories or include :setting:`LOCALE_PATHS`. It will -also write files in UTF-8 rather than in :setting:`FILE_CHARSET`. +:setting:`STATIC_ROOT` directories or include :setting:`LOCALE_PATHS`. .. django-admin-option:: --all, -a diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index ef00d19b1b..cc2892077b 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -1424,7 +1424,12 @@ attempt. Default: ``'utf-8'`` The character encoding used to decode any files read from disk. This includes -template files and initial SQL data files. +template files, static files, and translation catalogs. + +.. deprecated:: 2.2 + + This setting is deprecated. Starting with Django 3.1, files read from disk + must be UTF-8 encoded. .. setting:: FILE_UPLOAD_HANDLERS @@ -3374,7 +3379,6 @@ Error reporting File uploads ------------ * :setting:`DEFAULT_FILE_STORAGE` -* :setting:`FILE_CHARSET` * :setting:`FILE_UPLOAD_HANDLERS` * :setting:`FILE_UPLOAD_MAX_MEMORY_SIZE` * :setting:`FILE_UPLOAD_PERMISSIONS` diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt index 0b0282b1cc..8617442318 100644 --- a/docs/ref/unicode.txt +++ b/docs/ref/unicode.txt @@ -265,12 +265,11 @@ Use strings when creating templates manually:: from django.template import Template t2 = Template('This is a string template.') -But the common case is to read templates from the filesystem, and this creates -a slight complication: not all filesystems store their data encoded as UTF-8. -If your template files are not stored with a UTF-8 encoding, set the :setting:`FILE_CHARSET` -setting to the encoding of the files on disk. When Django reads in a template -file, it will convert the data from this encoding to Unicode. (:setting:`FILE_CHARSET` -is set to ``'utf-8'`` by default.) +But the common case is to read templates from the filesystem. If your template +files are not stored with a UTF-8 encoding, adjust the :setting:`TEMPLATES` +setting. The built-in :py:mod:`~django.template.backends.django` backend +provides the ``'file_charset'`` option to change the encoding used to read +files from disk. The :setting:`DEFAULT_CHARSET` setting controls the encoding of rendered templates. This is set to UTF-8 by default. |
