mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #15992 -- Added more references to settings. Thanks, aaugustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
61da3cc47a
commit
49f57a5d28
32 changed files with 215 additions and 199 deletions
|
@ -443,10 +443,10 @@ The old :exc:`EnvironmentError` has split into an :exc:`ImportError` when
|
|||
Django fails to find the settings module and a :exc:`RuntimeError` when you try
|
||||
to reconfigure settings after having already used them
|
||||
|
||||
``LOGIN_URL`` has moved
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
:setting:`LOGIN_URL` has moved
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The ``LOGIN_URL`` constant moved from ``django.contrib.auth`` into the
|
||||
The :setting:`LOGIN_URL` constant moved from ``django.contrib.auth`` into the
|
||||
``settings`` module. Instead of using ``from django.contrib.auth import
|
||||
LOGIN_URL`` refer to :setting:`settings.LOGIN_URL <LOGIN_URL>`.
|
||||
|
||||
|
@ -454,11 +454,11 @@ LOGIN_URL`` refer to :setting:`settings.LOGIN_URL <LOGIN_URL>`.
|
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In 0.96, if a URL didn't end in a slash or have a period in the final
|
||||
component of its path, and ``APPEND_SLASH`` was True, Django would redirect
|
||||
to the same URL, but with a slash appended to the end. Now, Django checks to
|
||||
see whether the pattern without the trailing slash would be matched by
|
||||
something in your URL patterns. If so, no redirection takes place, because it
|
||||
is assumed you deliberately wanted to catch that pattern.
|
||||
component of its path, and :setting:`APPEND_SLASH` was True, Django would
|
||||
redirect to the same URL, but with a slash appended to the end. Now, Django
|
||||
checks to see whether the pattern without the trailing slash would be matched
|
||||
by something in your URL patterns. If so, no redirection takes place, because
|
||||
it is assumed you deliberately wanted to catch that pattern.
|
||||
|
||||
For most people, this won't require any changes. Some people, though, have URL
|
||||
patterns that look like this::
|
||||
|
@ -548,8 +548,8 @@ need to reload your data. Do this after you have made the change to using
|
|||
**Back up your database first!**
|
||||
|
||||
For SQLite, this means making a copy of the single file that stores the
|
||||
database (the name of that file is the ``DATABASE_NAME`` in your settings.py
|
||||
file).
|
||||
database (the name of that file is the :setting:`DATABASE_NAME` in your
|
||||
settings.py file).
|
||||
|
||||
To upgrade each application to use a ``DecimalField``, you can do the
|
||||
following, replacing ``<app>`` in the code below with each app's name:
|
||||
|
|
|
@ -1076,8 +1076,8 @@ Up to version 1.1 Django used technical message IDs
|
|||
to provide localizers the possibility to translate date and time formats. They
|
||||
were translatable :term:`translation strings <translation string>` that could
|
||||
be recognized because they were all upper case (for example
|
||||
``DATETIME_FORMAT``, ``DATE_FORMAT``, ``TIME_FORMAT``). They have been
|
||||
deprecated in favor of the new :ref:`Format localization
|
||||
:setting:`DATETIME_FORMAT`, :setting:`DATE_FORMAT`, :setting:`TIME_FORMAT`).
|
||||
They have been deprecated in favor of the new :ref:`Format localization
|
||||
<format-localization>` infrastructure that allows localizers to specify that
|
||||
information in a ``formats.py`` file in the corresponding
|
||||
``django/conf/locale/<locale name>/`` directory.
|
||||
|
|
|
@ -249,7 +249,7 @@ framework, we have "fixed" the problem by making the list of
|
|||
prohibited words an empty list.
|
||||
|
||||
If you want to restore the old behavior, simply put a
|
||||
``PROFANITIES_LIST`` setting in your settings file that includes the
|
||||
:setting:`PROFANITIES_LIST` setting in your settings file that includes the
|
||||
words that you want to prohibit (see the `commit that implemented this
|
||||
change`_ if you want to see the list of words that was historically
|
||||
prohibited). However, if avoiding profanities is important to you, you
|
||||
|
|
|
@ -264,8 +264,8 @@ The GeoDjango test suite is now included when
|
|||
:ref:`running the Django test suite <running-unit-tests>` with ``runtests.py``
|
||||
when using :ref:`spatial database backends <spatial-backends>`.
|
||||
|
||||
``MEDIA_URL`` and ``STATIC_URL`` must end in a slash
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
:setting:`MEDIA_URL` and :setting:`STATIC_URL` must end in a slash
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Previously, the :setting:`MEDIA_URL` setting only required a trailing slash if
|
||||
it contained a suffix beyond the domain name.
|
||||
|
@ -581,7 +581,7 @@ gettext domain):
|
|||
|
||||
* Now it is possible to override the translations shipped with applications by
|
||||
using the :setting:`LOCALE_PATHS` setting whose translations have now higher
|
||||
precedence than the translations of ``INSTALLED_APPS`` applications.
|
||||
precedence than the translations of :setting:`INSTALLED_APPS` applications.
|
||||
The relative priority among the values listed in this setting has also been
|
||||
modified so the paths listed first have higher precedence than the
|
||||
ones listed later.
|
||||
|
@ -589,7 +589,7 @@ gettext domain):
|
|||
* The ``locale`` subdirectory of the directory containing the settings, that
|
||||
usually coincides with and is know as the *project directory* is being
|
||||
deprecated in this release as a source of translations. (the precedence of
|
||||
these translations is intermediate between applications and ``LOCALE_PATHS``
|
||||
these translations is intermediate between applications and :setting:`LOCALE_PATHS`
|
||||
translations). See the `corresponding deprecated features section`_
|
||||
of this document.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue