Ticket #15992: 15992.5.patch

File 15992.5.patch, 52.7 KB (added by Aymeric Augustin, 13 years ago)
  • docs/internals/contributing/writing-code/unit-tests.txt

     
    8585
    8686You will also need to ensure that your database uses UTF-8 as the default
    8787character set. If your database server doesn't use UTF-8 as a default charset,
    88 you will need to include a value for ``TEST_CHARSET`` in the settings
     88you will need to include a value for :setting:`TEST_CHARSET` in the settings
    8989dictionary for the applicable database.
    9090
    9191Running only some of the tests
  • docs/internals/deprecation.txt

     
    170170          and :class:`django.contrib.auth.context_processors.PermLookupDict`,
    171171          respectively.
    172172
    173         * The ``MEDIA_URL`` or ``STATIC_URL`` settings are required to end
    174           with a trailing slash to ensure there is a consistent way to
    175           combine paths in templates.
     173        * The :setting:`MEDIA_URL` or :setting:`STATIC_URL` settings are
     174          required to end with a trailing slash to ensure there is a consistent
     175          way to combine paths in templates.
    176176
    177177    * 1.6
    178178        * The compatibility modules ``django.utils.copycompat`` and
  • docs/howto/i18n.txt

     
    5555
    5656All message file repositories are structured the same way. They are:
    5757
    58     * All paths listed in ``LOCALE_PATHS`` in your settings file are
     58    * All paths listed in :setting:`LOCALE_PATHS` in your settings file are
    5959      searched for ``<language>/LC_MESSAGES/django.(po|mo)``
    6060    * ``$PROJECTPATH/locale/<language>/LC_MESSAGES/django.(po|mo)`` --
    6161      deprecated, see above.
  • docs/topics/http/file-uploads.txt

     
    225225
    226226When a user uploads a file, Django passes off the file data to an *upload
    227227handler* -- a small class that handles file data as it gets uploaded. Upload
    228 handlers are initially defined in the ``FILE_UPLOAD_HANDLERS`` setting, which
     228handlers are initially defined in the :setting:`FILE_UPLOAD_HANDLERS` setting, which
    229229defaults to::
    230230
    231231    ("django.core.files.uploadhandler.MemoryFileUploadHandler",
     
    246246Sometimes particular views require different upload behavior. In these cases,
    247247you can override upload handlers on a per-request basis by modifying
    248248``request.upload_handlers``. By default, this list will contain the upload
    249 handlers given by ``FILE_UPLOAD_HANDLERS``, but you can modify the list as you
     249handlers given by :setting:`FILE_UPLOAD_HANDLERS`, but you can modify the list as you
    250250would any other list.
    251251
    252252For instance, suppose you've written a ``ProgressBarUploadHandler`` that
  • docs/topics/http/sessions.txt

     
    2323      has ``SessionMiddleware`` activated.
    2424
    2525If you don't want to use sessions, you might as well remove the
    26 ``SessionMiddleware`` line from ``MIDDLEWARE_CLASSES`` and
     26``SessionMiddleware`` line from :setting:`MIDDLEWARE_CLASSES` and
    2727``'django.contrib.sessions'`` from your :setting:`INSTALLED_APPS`.
    2828It'll save you a small bit of overhead.
    2929
     
    3939------------------------------
    4040
    4141If you want to use a database-backed session, you need to add
    42 ``'django.contrib.sessions'`` to your ``INSTALLED_APPS`` setting.
     42``'django.contrib.sessions'`` to your :setting:`INSTALLED_APPS` setting.
    4343
    4444Once you have configured your installation, run ``manage.py syncdb``
    4545to install the single database table that stores session data.
     
    359359database on every single request.
    360360
    361361Note that the session cookie is only sent when a session has been created or
    362 modified. If ``SESSION_SAVE_EVERY_REQUEST`` is ``True``, the session cookie
    363 will be sent on every request.
     362modified. If :setting:`SESSION_SAVE_EVERY_REQUEST` is ``True``, the session
     363cookie will be sent on every request.
    364364
    365365Similarly, the ``expires`` part of a session cookie is updated each time the
    366366session cookie is sent.
     
    372372persistent sessions with the :setting:`SESSION_EXPIRE_AT_BROWSER_CLOSE`
    373373setting.
    374374
    375 By default, ``SESSION_EXPIRE_AT_BROWSER_CLOSE`` is set to ``False``, which
    376 means session cookies will be stored in users' browsers for as long as
     375By default, :setting:`SESSION_EXPIRE_AT_BROWSER_CLOSE` is set to ``False``,
     376which means session cookies will be stored in users' browsers for as long as
    377377:setting:`SESSION_COOKIE_AGE`. Use this if you don't want people to have to
    378378log in every time they open a browser.
    379379
    380 If ``SESSION_EXPIRE_AT_BROWSER_CLOSE`` is set to ``True``, Django will use
     380If :setting:`SESSION_EXPIRE_AT_BROWSER_CLOSE` is set to ``True``, Django will use
    381381browser-length cookies -- cookies that expire as soon as the user closes his or
    382382her browser. Use this if you want people to have to log in every time they open
    383383a browser.
  • docs/topics/http/views.txt

     
    4848
    4949.. admonition:: Django's Time Zone
    5050
    51     Django includes a ``TIME_ZONE`` setting that defaults to
     51    Django includes a :setting:`TIME_ZONE` setting that defaults to
    5252    ``America/Chicago``. This probably isn't where you live, so you might want
    5353    to change it in your settings file.
    5454
  • docs/topics/i18n/internationalization.txt

     
    674674    )
    675675
    676676Each string in ``packages`` should be in Python dotted-package syntax (the
    677 same format as the strings in ``INSTALLED_APPS``) and should refer to a package
     677same format as the strings in :setting:`INSTALLED_APPS`) and should refer to a package
    678678that contains a ``locale`` directory. If you specify multiple packages, all
    679679those catalogs are merged into one catalog. This is useful if you have
    680680JavaScript that uses strings from different applications.
     
    707707later.
    708708
    709709.. versionchanged:: 1.3
    710     Directories listed in ``LOCALE_PATHS`` weren't included in the lookup
     710    Directories listed in :setting:`LOCALE_PATHS` weren't included in the lookup
    711711    algorithm until version 1.3.
    712712
    713713Using the JavaScript translation catalog
  • docs/topics/i18n/deployment.txt

     
    1313optimizations so as not to load the internationalization machinery.
    1414
    1515You'll probably also want to remove ``'django.core.context_processors.i18n'``
    16 from your ``TEMPLATE_CONTEXT_PROCESSORS`` setting.
     16from your :setting:`TEMPLATE_CONTEXT_PROCESSORS` setting.
    1717
    1818.. note::
    1919
     
    4747other translator finds a translation.
    4848
    4949If all you want to do is run Django with your native language, and a language
    50 file is available for it, all you need to do is set ``LANGUAGE_CODE``.
     50file is available for it, all you need to do is set :setting:`LANGUAGE_CODE`.
    5151
    5252If you want to let each individual user specify which language he or she
    5353prefers, use ``LocaleMiddleware``. ``LocaleMiddleware`` enables language
    5454selection based on data from the request. It customizes content for each user.
    5555
    5656To use ``LocaleMiddleware``, add ``'django.middleware.locale.LocaleMiddleware'``
    57 to your ``MIDDLEWARE_CLASSES`` setting. Because middleware order matters, you
     57to your :setting:`MIDDLEWARE_CLASSES` setting. Because middleware order matters, you
    5858should follow these guidelines:
    5959
    6060    * Make sure it's one of the first middlewares installed.
     
    6262      makes use of session data.
    6363    * If you use ``CacheMiddleware``, put ``LocaleMiddleware`` after it.
    6464
    65 For example, your ``MIDDLEWARE_CLASSES`` might look like this::
     65For example, your :setting:`MIDDLEWARE_CLASSES` might look like this::
    6666
    6767    MIDDLEWARE_CLASSES = (
    6868       'django.contrib.sessions.middleware.SessionMiddleware',
     
    8181
    8282    * Failing that, it looks for a cookie.
    8383
    84       The name of the cookie used is set by the ``LANGUAGE_COOKIE_NAME``
     84      The name of the cookie used is set by the :setting:`LANGUAGE_COOKIE_NAME`
    8585      setting. (The default name is ``django_language``.)
    8686
    8787    * Failing that, it looks at the ``Accept-Language`` HTTP header. This
     
    8989      prefer, in order by priority. Django tries each language in the header
    9090      until it finds one with available translations.
    9191
    92     * Failing that, it uses the global ``LANGUAGE_CODE`` setting.
     92    * Failing that, it uses the global :setting:`LANGUAGE_CODE` setting.
    9393
    9494.. _locale-middleware-notes:
    9595
     
    107107    * Only languages listed in the :setting:`LANGUAGES` setting can be selected.
    108108      If you want to restrict the language selection to a subset of provided
    109109      languages (because your application doesn't provide all those languages),
    110       set ``LANGUAGES`` to a list of languages. For example::
     110      set :setting:`LANGUAGES` to a list of languages. For example::
    111111
    112112          LANGUAGES = (
    113113            ('de', _('German')),
     
    118118      selection to German and English (and any sublanguage, like de-ch or
    119119      en-us).
    120120
    121     * If you define a custom ``LANGUAGES`` setting, as explained in the
     121    * If you define a custom :setting:`LANGUAGES` setting, as explained in the
    122122      previous bullet, it's OK to mark the languages as translation strings
    123123      -- but use a "dummy" ``ugettext()`` function, not the one in
    124124      ``django.utils.translation``. You should *never* import
     
    139139      With this arrangement, ``django-admin.py makemessages`` will still find
    140140      and mark these strings for translation, but the translation won't happen
    141141      at runtime -- so you'll have to remember to wrap the languages in the
    142       *real* ``ugettext()`` in any code that uses ``LANGUAGES`` at runtime.
     142      *real* ``ugettext()`` in any code that uses :setting:`LANGUAGES` at runtime.
    143143
    144144    * The ``LocaleMiddleware`` can only select languages for which there is a
    145145      Django-provided base translation. If you want to provide translations
  • docs/topics/cache.txt

     
    420420entire site. You'll need to add
    421421``'django.middleware.cache.UpdateCacheMiddleware'`` and
    422422``'django.middleware.cache.FetchFromCacheMiddleware'`` to your
    423 ``MIDDLEWARE_CLASSES`` setting, as in this example::
     423:setting:`MIDDLEWARE_CLASSES` setting, as in this example::
    424424
    425425    MIDDLEWARE_CLASSES = (
    426426        'django.middleware.cache.UpdateCacheMiddleware',
  • docs/topics/testing.txt

     
    383383Aside from using a separate database, the test runner will otherwise
    384384use all of the same database settings you have in your settings file:
    385385:setting:`ENGINE`, :setting:`USER`, :setting:`HOST`, etc. The test
    386 database is created by the user specified by ``USER``, so you'll need
     386database is created by the user specified by :setting:`USER`, so you'll need
    387387to make sure that the given user account has sufficient privileges to
    388388create a new database on the system.
    389389
     
    13091309``django.test.TestCase`` provides the ability to customize the URLconf
    13101310configuration for the duration of the execution of a test suite. If your
    13111311``TestCase`` instance defines an ``urls`` attribute, the ``TestCase`` will use
    1312 the value of that attribute as the ``ROOT_URLCONF`` for the duration of that
     1312the value of that attribute as the :setting:`ROOT_URLCONF` for the duration of that
    13131313test.
    13141314
    13151315For example::
  • docs/topics/logging.txt

     
    486486    The ``include_html`` argument of ``AdminEmailHandler`` is used to
    487487    control whether the traceback email includes an HTML attachment
    488488    containing the full content of the debug Web page that would have been
    489     produced if ``DEBUG`` were ``True``. To set this value in your
     489    produced if :setting:`DEBUG` were ``True``. To set this value in your
    490490    configuration, include it in the handler definition for
    491491    ``django.utils.log.AdminEmailHandler``, like this::
    492492
  • docs/topics/email.txt

     
    509509-------------------------------
    510510
    511511If you need to change how emails are sent you can write your own email
    512 backend. The ``EMAIL_BACKEND`` setting in your settings file is then the
     512backend. The :setting:`EMAIL_BACKEND` setting in your settings file is then the
    513513Python import path for your backend class.
    514514
    515515Custom email backends should subclass ``BaseEmailBackend`` that is located in
  • docs/topics/templates.txt

     
    101101``title`` attribute of the ``section`` object.
    102102
    103103If you use a variable that doesn't exist, the template system will insert
    104 the value of the ``TEMPLATE_STRING_IF_INVALID`` setting, which is set to ``''``
     104the value of the :setting:`TEMPLATE_STRING_IF_INVALID` setting, which is set to ``''``
    105105(the empty string) by default.
    106106
    107107Filters
  • docs/topics/settings.txt

     
    209209first positional argument) in the call to ``configure()``.
    210210
    211211In this example, default settings are taken from ``myapp_defaults``, and the
    212 ``DEBUG`` setting is set to ``True``, regardless of its value in
     212:setting:`DEBUG` setting is set to ``True``, regardless of its value in
    213213``myapp_defaults``::
    214214
    215215    from django.conf import settings
  • docs/releases/1.3.txt

     
    264264:ref:`running the Django test suite <running-unit-tests>` with ``runtests.py``
    265265when using :ref:`spatial database backends <spatial-backends>`.
    266266
    267 ``MEDIA_URL`` and ``STATIC_URL`` must end in a slash
    268 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     267:setting:`MEDIA_URL` and :setting:`STATIC_URL` must end in a slash
     268~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    269269
    270270Previously, the :setting:`MEDIA_URL` setting only required a trailing slash if
    271271it contained a suffix beyond the domain name.
     
    581581
    582582 * Now it is possible to override the translations shipped with applications by
    583583   using the :setting:`LOCALE_PATHS` setting whose translations have now higher
    584    precedence than the translations of ``INSTALLED_APPS`` applications.
     584   precedence than the translations of :setting:`INSTALLED_APPS` applications.
    585585   The relative priority among the values listed in this setting has also been
    586586   modified so the paths listed first have higher precedence than the
    587587   ones listed later.
     
    589589 * The ``locale`` subdirectory of the directory containing the settings, that
    590590   usually coincides with and is know as the *project directory* is being
    591591   deprecated in this release as a source of translations. (the precedence of
    592    these translations is intermediate between applications and ``LOCALE_PATHS``
     592   these translations is intermediate between applications and :setting:`LOCALE_PATHS`
    593593   translations). See the `corresponding deprecated features section`_
    594594   of this document.
    595595
  • docs/releases/1.0-porting-guide.txt

     
    443443Django fails to find the settings module and a :exc:`RuntimeError` when you try
    444444to reconfigure settings after having already used them
    445445
    446 ``LOGIN_URL`` has moved
    447 ~~~~~~~~~~~~~~~~~~~~~~~
     446:setting:`LOGIN_URL` has moved
     447~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    448448
    449 The ``LOGIN_URL`` constant moved from ``django.contrib.auth`` into the
     449The :setting:`LOGIN_URL` constant moved from ``django.contrib.auth`` into the
    450450``settings`` module. Instead of using ``from django.contrib.auth import
    451451LOGIN_URL`` refer to :setting:`settings.LOGIN_URL <LOGIN_URL>`.
    452452
     
    454454~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    455455
    456456In 0.96, if a URL didn't end in a slash or have a period in the final
    457 component of its path, and ``APPEND_SLASH`` was True, Django would redirect
     457component of its path, and :setting:`APPEND_SLASH` was True, Django would redirect
    458458to the same URL, but with a slash appended to the end. Now, Django checks to
    459459see whether the pattern without the trailing slash would be matched by
    460460something in your URL patterns. If so, no redirection takes place, because it
     
    548548  **Back up your database first!**
    549549
    550550  For SQLite, this means making a copy of the single file that stores the
    551   database (the name of that file is the ``DATABASE_NAME`` in your settings.py
     551  database (the name of that file is the :setting:`DATABASE_NAME` in your settings.py
    552552  file).
    553553
    554554To upgrade each application to use a ``DecimalField``, you can do the
  • docs/releases/1.3-alpha-1.txt

     
    249249prohibited words an empty list.
    250250
    251251If you want to restore the old behavior, simply put a
    252 ``PROFANITIES_LIST`` setting in your settings file that includes the
     252:setting:`PROFANITIES_LIST` setting in your settings file that includes the
    253253words that you want to prohibit (see the `commit that implemented this
    254254change`_ if you want to see the list of words that was historically
    255255prohibited). However, if avoiding profanities is important to you, you
  • docs/releases/1.2.txt

     
    10761076to provide localizers the possibility to translate date and time formats. They
    10771077were translatable :term:`translation strings <translation string>` that could
    10781078be recognized because they were all upper case (for example
    1079 ``DATETIME_FORMAT``, ``DATE_FORMAT``, ``TIME_FORMAT``). They have been
     1079:setting:`DATETIME_FORMAT`, :setting:`DATE_FORMAT`, :setting:`TIME_FORMAT`). They have been
    10801080deprecated in favor of the new :ref:`Format localization
    10811081<format-localization>` infrastructure that allows localizers to specify that
    10821082information in a ``formats.py`` file in the corresponding
  • docs/faq/models.txt

     
    66How can I see the raw SQL queries Django is running?
    77----------------------------------------------------
    88
    9 Make sure your Django ``DEBUG`` setting is set to ``True``. Then, just do
     9Make sure your Django :setting:`DEBUG` setting is set to ``True``. Then, just do
    1010this::
    1111
    1212    >>> from django.db import connection
     
    1414    [{'sql': 'SELECT polls_polls.id,polls_polls.question,polls_polls.pub_date FROM polls_polls',
    1515    'time': '0.002'}]
    1616
    17 ``connection.queries`` is only available if ``DEBUG`` is ``True``. It's a list
     17``connection.queries`` is only available if :setting:`DEBUG` is ``True``. It's a list
    1818of dictionaries in order of query execution. Each dictionary has the following::
    1919
    2020    ``sql`` -- The raw SQL statement
     
    8989
    9090Django isn't known to leak memory. If you find your Django processes are
    9191allocating more and more memory, with no sign of releasing it, check to make
    92 sure your ``DEBUG`` setting is set to ``False``. If ``DEBUG`` is ``True``, then
     92sure your :setting:`DEBUG` setting is set to ``False``. If :setting:`DEBUG` is ``True``, then
    9393Django saves a copy of every SQL statement it has executed.
    9494
    9595(The queries are saved in ``django.db.connection.queries``. See
    9696`How can I see the raw SQL queries Django is running?`_.)
    9797
    98 To fix the problem, set ``DEBUG`` to ``False``.
     98To fix the problem, set :setting:`DEBUG` to ``False``.
    9999
    100100If you need to clear the query list manually at any point in your functions,
    101101just call ``reset_queries()``, like this::
  • docs/faq/admin.txt

     
    88sent out by Django doesn't match the domain in your browser. Try these two
    99things:
    1010
    11     * Set the ``SESSION_COOKIE_DOMAIN`` setting in your admin config file
     11    * Set the :setting:`SESSION_COOKIE_DOMAIN` setting in your admin config file
    1212      to match your domain. For example, if you're going to
    1313      "http://www.example.com/admin/" in your browser, in
    1414      "myproject.settings" you should set ``SESSION_COOKIE_DOMAIN = 'www.example.com'``.
     
    1717      don't have dots in them. If you're running the admin site on "localhost"
    1818      or another domain that doesn't have a dot in it, try going to
    1919      "localhost.localdomain" or "127.0.0.1". And set
    20       ``SESSION_COOKIE_DOMAIN`` accordingly.
     20      :setting:`SESSION_COOKIE_DOMAIN` accordingly.
    2121
    2222I can't log in. When I enter a valid username and password, it brings up the login page again, with a "Please enter a correct username and password" error.
    2323-----------------------------------------------------------------------------------------------------------------------------------------------------------
  • docs/ref/generic-views.txt

     
    5858      just before rendering the template.
    5959
    6060    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    61       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     61      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    6262
    6363**Example:**
    6464
     
    198198      the view's template.
    199199
    200200    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    201       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     201      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    202202
    203203    * ``allow_future``: A boolean specifying whether to include "future"
    204204      objects on this page, where "future" means objects in which the field
     
    290290      this is ``False``.
    291291
    292292    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    293       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     293      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    294294
    295295    * ``allow_future``: A boolean specifying whether to include "future"
    296296      objects on this page, where "future" means objects in which the field
     
    377377      determining the variable's name.
    378378
    379379    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    380       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     380      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    381381
    382382    * ``allow_future``: A boolean specifying whether to include "future"
    383383      objects on this page, where "future" means objects in which the field
     
    465465      determining the variable's name.
    466466
    467467    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    468       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     468      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    469469
    470470    * ``allow_future``: A boolean specifying whether to include "future"
    471471      objects on this page, where "future" means objects in which the field
     
    550550      determining the variable's name.
    551551
    552552    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    553       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     553      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    554554
    555555    * ``allow_future``: A boolean specifying whether to include "future"
    556556      objects on this page, where "future" means objects in which the field
     
    660660      to use in the template context. By default, this is ``'object'``.
    661661
    662662    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    663       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     663      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    664664
    665665    * ``allow_future``: A boolean specifying whether to include "future"
    666666      objects on this page, where "future" means objects in which the field
     
    738738      determining the variable's name.
    739739
    740740    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    741       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     741      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    742742
    743743**Template name:**
    744744
     
    852852      to use in the template context. By default, this is ``'object'``.
    853853
    854854    * ``mimetype``: The MIME type to use for the resulting document. Defaults
    855       to the value of the ``DEFAULT_CONTENT_TYPE`` setting.
     855      to the value of the :setting:`DEFAULT_CONTENT_TYPE` setting.
    856856
    857857**Template name:**
    858858
  • docs/ref/forms/fields.txt

     
    764764.. attribute:: URLField.validator_user_agent
    765765
    766766    String used as the user-agent used when checking for a URL's existence.
    767     Defaults to the value of the ``URL_VALIDATOR_USER_AGENT`` setting.
     767    Defaults to the value of the :setting:`URL_VALIDATOR_USER_AGENT` setting.
    768768
    769769.. versionchanged:: 1.2
    770770   The URLField previously did not recognize URLs as valid that contained an IDN
  • docs/ref/templates/builtins.txt

     
    13071307``datetime.datetime.now()``), the output will be the string
    13081308``'Wed 09 Jan 2008'``.
    13091309
    1310 The format passed can be one of the predefined ones ``DATE_FORMAT``,
    1311 ``DATETIME_FORMAT``, ``SHORT_DATE_FORMAT`` or ``SHORT_DATETIME_FORMAT``, or a
     1310The format passed can be one of the predefined ones :setting:`DATE_FORMAT`,
     1311:setting:`DATETIME_FORMAT`, :setting:`SHORT_DATE_FORMAT` or :setting:`SHORT_DATETIME_FORMAT`, or a
    13121312custom format that uses the format specifiers shown in the table above. Note
    13131313that predefined formats may vary depending on the current locale.
    13141314
     
    19411941
    19421942Formats a time according to the given format.
    19431943
    1944 Given format can be the predefined one ``TIME_FORMAT``, or a custom format,
     1944Given format can be the predefined one :setting:`TIME_FORMAT`, or a custom format,
    19451945same as the :tfilter:`date` filter. Note that the predefined format is locale-
    19461946dependant.
    19471947
     
    22432243-------------------------------
    22442244
    22452245Django comes with a couple of other template-tag libraries that you have to
    2246 enable explicitly in your ``INSTALLED_APPS`` setting and enable in your
     2246enable explicitly in your :setting:`INSTALLED_APPS` setting and enable in your
    22472247template with the ``{% load %}`` tag.
    22482248
    22492249django.contrib.humanize
     
    22742274
    22752275Provides a couple of templatetags that allow specifying translatable text in
    22762276Django templates. It is slightly different from the libraries described
    2277 above because you don't need to add any application to the ``INSTALLED_APPS``
     2277above because you don't need to add any application to the :setting:`INSTALLED_APPS`
    22782278setting but rather set :setting:`USE_I18N` to True, then loading it with
    22792279``{% load i18n %}``. See :ref:`specifying-translation-strings-in-template-code`.
    22802280
     
    22832283
    22842284Provides a couple of templatetags that allow control over the localization of
    22852285values in Django templates. It is slightly different from the libraries described
    2286 above because you don't need to add any application to the ``INSTALLED_APPS``;
     2286above because you don't need to add any application to the :setting:`INSTALLED_APPS`;
    22872287you only need to load the library using ``{% load l10n %}``. See
    22882288:ref:`topic-l10n-templates`.
  • docs/ref/contrib/gis/geoip.txt

     
    1818datasets in binary format (the CSV files will not work!).  These datasets may be
    1919`downloaded from MaxMind`__.  Grab the ``GeoIP.dat.gz`` and ``GeoLiteCity.dat.gz``
    2020and unzip them in a directory corresponding to what you set
    21 ``GEOIP_PATH`` with in your settings.  See the example and reference below
     21:setting:`GEOIP_PATH` with in your settings.  See the example and reference below
    2222for more details.
    2323
    2424__ http://www.maxmind.com/app/c
  • docs/ref/contrib/gis/install.txt

     
    592592__ http://www.gaia-gis.it/spatialite/resources.html
    593593
    594594
    595 Add ``django.contrib.gis`` to ``INSTALLED_APPS``
    596 ------------------------------------------------
     595Add ``django.contrib.gis`` to :setting:`INSTALLED_APPS`
     596-------------------------------------------------------
    597597
    598598Like other Django contrib applications, you will *only* need to add
    599599:mod:`django.contrib.gis` to :setting:`INSTALLED_APPS` in your settings.
  • docs/ref/contrib/messages.txt

     
    386386Default: ``None``
    387387
    388388The storage backends that use cookies -- ``CookieStorage`` and
    389 ``FallbackStorage`` -- use the value of ``SESSION_COOKIE_DOMAIN`` in
     389``FallbackStorage`` -- use the value of :setting:`SESSION_COOKIE_DOMAIN` in
    390390setting their cookies. See the :doc:`settings documentation </ref/settings>`
    391391for more information on how this works and why you might need to set it.
    392392
  • docs/ref/contrib/index.txt

     
    1414
    1515    For most of these add-ons -- specifically, the add-ons that include either
    1616    models or template tags -- you'll need to add the package name (e.g.,
    17     ``'django.contrib.admin'``) to your ``INSTALLED_APPS`` setting and re-run
     17    ``'django.contrib.admin'``) to your :setting:`INSTALLED_APPS` setting and re-run
    1818    ``manage.py syncdb``.
    1919
    2020.. _"batteries included" philosophy: http://docs.python.org/tutorial/stdlib.html#batteries-included
  • docs/ref/contrib/admin/index.txt

     
    17651765    )
    17661766
    17671767Above we used ``admin.autodiscover()`` to automatically load the
    1768 ``INSTALLED_APPS`` admin.py modules.
     1768:setting:`INSTALLED_APPS` admin.py modules.
    17691769
    17701770In this example, we register the ``AdminSite`` instance
    17711771``myproject.admin.admin_site`` at the URL ``/myadmin/`` ::
  • docs/ref/databases.txt

     
    262262       :setting:`HOST`, :setting:`PORT`
    263263    3. MySQL option files.
    264264
    265 In other words, if you set the name of the database in ``OPTIONS``,
    266 this will take precedence over ``NAME``, which would override
     265In other words, if you set the name of the database in :setting:`OPTIONS`,
     266this will take precedence over :setting:`NAME`, which would override
    267267anything in a `MySQL option file`_.
    268268
    269269Here's a sample configuration which uses a MySQL option file::
     
    574574
    575575If you don't use a ``tnsnames.ora`` file or a similar naming method that
    576576recognizes the SID ("xe" in this example), then fill in both
    577 ``HOST`` and ``PORT`` like so::
     577:setting:`HOST` and :setting:`PORT` like so::
    578578
    579579    DATABASES = {
    580580        'default': {
     
    587587        }
    588588    }
    589589
    590 You should supply both ``HOST`` and ``PORT``, or leave both
     590You should supply both :setting:`HOST` and :setting:`PORT`, or leave both
    591591as empty strings.
    592592
    593593Threaded option
  • docs/ref/django-admin.txt

     
    5757---------
    5858
    5959Many commands take a list of "app names." An "app name" is the basename of
    60 the package containing your models. For example, if your ``INSTALLED_APPS``
     60the package containing your models. For example, if your :setting:`INSTALLED_APPS`
    6161contains the string ``'mysite.blog'``, the app name is ``blog``.
    6262
    6363Determining the version
     
    126126
    127127Runs the command-line client for the database engine specified in your
    128128``ENGINE`` setting, with the connection parameters specified in your
    129 ``USER``, ``PASSWORD``, etc., settings.
     129:setting:`USER`, :setting:`PASSWORD`, etc., settings.
    130130
    131131    * For PostgreSQL, this runs the ``psql`` command-line client.
    132132    * For MySQL, this runs the ``mysql`` command-line client.
     
    151151settings.
    152152
    153153Settings that don't appear in the defaults are followed by ``"###"``. For
    154 example, the default settings don't define ``ROOT_URLCONF``, so
    155 ``ROOT_URLCONF`` is followed by ``"###"`` in the output of ``diffsettings``.
     154example, the default settings don't define :setting:`ROOT_URLCONF`, so
     155:setting:`ROOT_URLCONF` is followed by ``"###"`` in the output of ``diffsettings``.
    156156
    157157Note that Django's default settings live in ``django/conf/global_settings.py``,
    158158if you're ever curious to see the full list of defaults.
     
    245245.. django-admin:: inspectdb
    246246
    247247Introspects the database tables in the database pointed-to by the
    248 ``NAME`` setting and outputs a Django model module (a ``models.py``
     248:setting:`NAME` setting and outputs a Django model module (a ``models.py``
    249249file) to standard output.
    250250
    251251Use this if you have a legacy database with which you'd like to use Django.
     
    309309Django will search in three locations for fixtures:
    310310
    311311   1. In the ``fixtures`` directory of every installed application
    312    2. In any directory named in the ``FIXTURE_DIRS`` setting
     312   2. In any directory named in the :setting:`FIXTURE_DIRS` setting
    313313   3. In the literal path named by the fixture
    314314
    315315Django will load any and all fixtures it finds in these locations that match
     
    340340
    341341would search ``<appname>/fixtures/foo/bar/mydata.json`` for each installed
    342342application,  ``<dirname>/foo/bar/mydata.json`` for each directory in
    343 ``FIXTURE_DIRS``, and the literal path ``foo/bar/mydata.json``.
     343:setting:`FIXTURE_DIRS`, and the literal path ``foo/bar/mydata.json``.
    344344
    345345When fixture files are processed, the data is saved to the database as is.
    346346Model defined ``save`` methods and ``pre_save`` signals are not called.
     
    742742~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    743743
    744744By default, the development server doesn't serve any static files for your site
    745 (such as CSS files, images, things under ``MEDIA_URL`` and so forth). If
     745(such as CSS files, images, things under :setting:`MEDIA_URL` and so forth). If
    746746you want to configure Django to serve static media, read :doc:`/howto/static-files`.
    747747
    748748shell
     
    912912
    913913.. django-admin:: syncdb
    914914
    915 Creates the database tables for all apps in ``INSTALLED_APPS`` whose tables
     915Creates the database tables for all apps in :setting:`INSTALLED_APPS` whose tables
    916916have not already been created.
    917917
    918918Use this command when you've added new applications to your project and want to
    919919install them in the database. This includes any apps shipped with Django that
    920 might be in ``INSTALLED_APPS`` by default. When you start a new project, run
     920might be in :setting:`INSTALLED_APPS` by default. When you start a new project, run
    921921this command to install the default apps.
    922922
    923923.. admonition:: Syncdb will not alter existing tables
     
    10321032
    10331033.. django-admin:: validate
    10341034
    1035 Validates all installed models (according to the ``INSTALLED_APPS`` setting)
     1035Validates all installed models (according to the :setting:`INSTALLED_APPS` setting)
    10361036and prints validation errors to standard output.
    10371037
    10381038Commands provided by applications
  • docs/ref/settings.txt

     
    8686tag. This is a security measure, so that template authors can't access files
    8787that they shouldn't be accessing.
    8888
    89 For example, if ``ALLOWED_INCLUDE_ROOTS`` is ``('/home/html', '/var/www')``,
     89For example, if :setting:`ALLOWED_INCLUDE_ROOTS` is ``('/home/html', '/var/www')``,
    9090then ``{% ssi /home/html/foo.txt %}`` would work, but ``{% ssi /etc/passwd %}``
    9191wouldn't.
    9292
     
    102102same URL with a slash appended. Note that the redirect may cause any data
    103103submitted in a POST request to be lost.
    104104
    105 The ``APPEND_SLASH`` setting is only used if
     105The :setting:`APPEND_SLASH` setting is only used if
    106106:class:`~django.middleware.common.CommonMiddleware` is installed
    107107(see :doc:`/topics/http/middleware`). See also :setting:`PREPEND_WWW`.
    108108
     
    634634:tfilter:`allowed date format strings <date>`.
    635635
    636636.. versionchanged:: 1.2
    637     This setting can now be overriden by setting ``USE_L10N`` to ``True``.
     637    This setting can now be overriden by setting :setting:`USE_L10N` to ``True``.
    638638
    639 See also ``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``SHORT_DATE_FORMAT``.
     639See also :setting:`DATETIME_FORMAT`, :setting:`TIME_FORMAT` and :setting:`SHORT_DATE_FORMAT`.
    640640
    641641.. setting:: DATE_INPUT_FORMATS
    642642
     
    657657syntax, that is different from the one used by Django for formatting dates
    658658to be displayed.
    659659
    660 See also ``DATETIME_INPUT_FORMATS`` and ``TIME_INPUT_FORMATS``.
     660See also :setting:`DATETIME_INPUT_FORMATS` and :setting:`TIME_INPUT_FORMATS`.
    661661
    662662.. _datetime: http://docs.python.org/library/datetime.html#strftime-strptime-behavior
    663663
     
    674674:tfilter:`allowed date format strings <date>`.
    675675
    676676.. versionchanged:: 1.2
    677     This setting can now be overriden by setting ``USE_L10N`` to ``True``.
     677    This setting can now be overriden by setting :setting:`USE_L10N` to ``True``.
    678678
    679 See also ``DATE_FORMAT``, ``TIME_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
     679See also :setting:`DATE_FORMAT`, :setting:`TIME_FORMAT` and :setting:`SHORT_DATETIME_FORMAT`.
    680680
    681681.. setting:: DATETIME_INPUT_FORMATS
    682682
     
    697697syntax, that is different from the one used by Django for formatting dates
    698698to be displayed.
    699699
    700 See also ``DATE_INPUT_FORMATS`` and ``TIME_INPUT_FORMATS``.
     700See also :setting:`DATE_INPUT_FORMATS` and :setting:`TIME_INPUT_FORMATS`.
    701701
    702702.. _datetime: http://docs.python.org/library/datetime.html#strftime-strptime-behavior
    703703
     
    720720are inappropriate for public consumption. File paths, configuration options, and
    721721the like all give attackers extra information about your server.
    722722
    723 It is also important to remember that when running with ``DEBUG`` turned on, Django
     723It is also important to remember that when running with :setting:`DEBUG` turned on, Django
    724724will remember every SQL query it executes. This is useful when you are debugging,
    725725but on a production server, it will rapidly consume memory.
    726726
    727 Never deploy a site into production with ``DEBUG`` turned on.
     727Never deploy a site into production with :setting:`DEBUG` turned on.
    728728
    729729.. _django/views/debug.py: http://code.djangoproject.com/browser/django/trunk/django/views/debug.py
    730730
     
    757757Default: ``'utf-8'``
    758758
    759759Default charset to use for all ``HttpResponse`` objects, if a MIME type isn't
    760 manually specified. Used with ``DEFAULT_CONTENT_TYPE`` to construct the
     760manually specified. Used with :setting:`DEFAULT_CONTENT_TYPE` to construct the
    761761``Content-Type`` header.
    762762
    763763.. setting:: DEFAULT_CONTENT_TYPE
     
    768768Default: ``'text/html'``
    769769
    770770Default content type to use for all ``HttpResponse`` objects, if a MIME type
    771 isn't manually specified. Used with ``DEFAULT_CHARSET`` to construct the
     771isn't manually specified. Used with :setting:`DEFAULT_CHARSET` to construct the
    772772``Content-Type`` header.
    773773
    774774.. setting:: DEFAULT_FILE_STORAGE
     
    855855
    856856The host to use for sending email.
    857857
    858 See also ``EMAIL_PORT``.
     858See also :setting:`EMAIL_PORT`.
    859859
    860860.. setting:: EMAIL_HOST_PASSWORD
    861861
     
    864864
    865865Default: ``''`` (Empty string)
    866866
    867 Password to use for the SMTP server defined in ``EMAIL_HOST``. This setting is
    868 used in conjunction with ``EMAIL_HOST_USER`` when authenticating to the SMTP
     867Password to use for the SMTP server defined in :setting:`EMAIL_HOST`. This setting is
     868used in conjunction with :setting:`EMAIL_HOST_USER` when authenticating to the SMTP
    869869server. If either of these settings is empty, Django won't attempt
    870870authentication.
    871871
    872 See also ``EMAIL_HOST_USER``.
     872See also :setting:`EMAIL_HOST_USER`.
    873873
    874874.. setting:: EMAIL_HOST_USER
    875875
     
    878878
    879879Default: ``''`` (Empty string)
    880880
    881 Username to use for the SMTP server defined in ``EMAIL_HOST``. If empty,
     881Username to use for the SMTP server defined in :setting:`EMAIL_HOST`. If empty,
    882882Django won't attempt authentication.
    883883
    884 See also ``EMAIL_HOST_PASSWORD``.
     884See also :setting:`EMAIL_HOST_PASSWORD`.
    885885
    886886.. setting:: EMAIL_PORT
    887887
     
    890890
    891891Default: ``25``
    892892
    893 Port to use for the SMTP server defined in ``EMAIL_HOST``.
     893Port to use for the SMTP server defined in :setting:`EMAIL_HOST`.
    894894
    895895.. setting:: EMAIL_SUBJECT_PREFIX
    896896
     
    10371037file, under the directory named as the current locale, and will use the
    10381038formats defined on this file.
    10391039
    1040 For example, if ``FORMAT_MODULE_PATH`` is set to ``mysite.formats``, and
     1040For example, if :setting:`FORMAT_MODULE_PATH` is set to ``mysite.formats``, and
    10411041current language is ``en`` (English), Django will expect a directory tree
    10421042like::
    10431043
     
    10481048                __init__.py
    10491049                formats.py
    10501050
    1051 Available formats are ``DATE_FORMAT``, ``TIME_FORMAT``, ``DATETIME_FORMAT``,
    1052 ``YEAR_MONTH_FORMAT``, ``MONTH_DAY_FORMAT``, ``SHORT_DATE_FORMAT``,
    1053 ``SHORT_DATETIME_FORMAT``, ``FIRST_DAY_OF_WEEK``, ``DECIMAL_SEPARATOR``,
    1054 ``THOUSAND_SEPARATOR`` and ``NUMBER_GROUPING``.
     1051Available formats are :setting:`DATE_FORMAT`, :setting:`TIME_FORMAT`,
     1052:setting:`DATETIME_FORMAT`, :setting:`YEAR_MONTH_FORMAT`,
     1053:setting:`MONTH_DAY_FORMAT`, :setting:`SHORT_DATE_FORMAT`,
     1054:setting:`SHORT_DATETIME_FORMAT`, :setting:`FIRST_DAY_OF_WEEK`,
     1055:setting:`DECIMAL_SEPARATOR`, :setting:`THOUSAND_SEPARATOR` and
     1056:setting:`NUMBER_GROUPING`.
    10551057
    10561058.. setting:: IGNORABLE_404_URLS
    10571059
     
    11001102
    11011103A tuple of IP addresses, as strings, that:
    11021104
    1103     * See debug comments, when ``DEBUG`` is ``True``
     1105    * See debug comments, when :setting:`DEBUG` is ``True``
    11041106    * Receive X headers if the ``XViewMiddleware`` is installed (see
    11051107      :doc:`/topics/http/middleware`)
    11061108
     
    11231125Default: ``'django_language'``
    11241126
    11251127The name of the cookie to use for the language cookie. This can be whatever you
    1126 want (but should be different from ``SESSION_COOKIE_NAME``). See
     1128want (but should be different from :setting:`SESSION_COOKIE_NAME`). See
    11271129:doc:`/topics/i18n/index`.
    11281130
    11291131.. setting:: LANGUAGES
     
    11471149Generally, the default value should suffice. Only set this setting if you want
    11481150to restrict language selection to a subset of the Django-provided languages.
    11491151
    1150 If you define a custom ``LANGUAGES`` setting, it's OK to mark the languages as
     1152If you define a custom :setting:`LANGUAGES` setting, it's OK to mark the languages as
    11511153translation strings (as in the default value referred to above) -- but use a
    11521154"dummy" ``gettext()`` function, not the one in ``django.utils.translation``.
    11531155You should *never* import ``django.utils.translation`` from within your
     
    11671169With this arrangement, ``django-admin.py makemessages`` will still find and
    11681170mark these strings for translation, but the translation won't happen at
    11691171runtime -- so you'll have to remember to wrap the languages in the *real*
    1170 ``gettext()`` in any code that uses ``LANGUAGES`` at runtime.
     1172``gettext()`` in any code that uses :setting:`LANGUAGES` at runtime.
    11711173
    11721174.. setting:: LOCALE_PATHS
    11731175
     
    12631265
    12641266Default: ``()`` (Empty tuple)
    12651267
    1266 A tuple in the same format as ``ADMINS`` that specifies who should get
     1268A tuple in the same format as :setting:`ADMINS` that specifies who should get
    12671269broken-link notifications when ``SEND_BROKEN_LINK_EMAILS=True``.
    12681270
    12691271.. setting:: MEDIA_ROOT
     
    13681370locales have different formats. For example, U.S. English would say
    13691371"January 1," whereas Spanish might say "1 Enero."
    13701372
    1371 See :tfilter:`allowed date format strings <date>`. See also ``DATE_FORMAT``,
    1372 ``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``YEAR_MONTH_FORMAT``.
     1373See :tfilter:`allowed date format strings <date>`. See also
     1374:setting:`DATE_FORMAT`, :setting:`DATETIME_FORMAT`,
     1375:setting:`TIME_FORMAT` and :setting:`YEAR_MONTH_FORMAT`.
    13731376
    13741377.. setting:: NUMBER_GROUPING
    13751378
     
    14631466
    14641467Default: ``False``
    14651468
    1466 Whether to send an email to the ``MANAGERS`` each time somebody visits a
     1469Whether to send an email to the :setting:`MANAGERS` each time somebody visits a
    14671470Django-powered page that is 404ed with a non-empty referer (i.e., a broken
    14681471link). This is only used if ``CommonMiddleware`` is installed (see
    1469 :doc:`/topics/http/middleware`). See also ``IGNORABLE_404_URLS`` and
     1472:doc:`/topics/http/middleware`). See also :setting:`IGNORABLE_404_URLS` and
    14701473:doc:`/howto/error-reporting`.
    14711474
    14721475.. setting:: SERIALIZATION_MODULES
     
    14901493Default: ``'root@localhost'``
    14911494
    14921495The email address that error messages come from, such as those sent to
    1493 ``ADMINS`` and ``MANAGERS``.
     1496:setting:`ADMINS` and :setting:`MANAGERS`.
    14941497
    14951498.. setting:: SESSION_COOKIE_AGE
    14961499
     
    15391542Default: ``'sessionid'``
    15401543
    15411544The name of the cookie to use for sessions. This can be whatever you want (but
    1542 should be different from ``LANGUAGE_COOKIE_NAME``). See the :doc:`/topics/http/sessions`.
     1545should be different from :setting:`LANGUAGE_COOKIE_NAME`).
     1546See the :doc:`/topics/http/sessions`.
    15431547
    15441548.. setting:: SESSION_COOKIE_PATH
    15451549
     
    16291633corresponding locale-dictated format has higher precedence and will be applied.
    16301634See :tfilter:`allowed date format strings <date>`.
    16311635
    1632 See also ``DATE_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
     1636See also :setting:`DATE_FORMAT` and :setting:`SHORT_DATETIME_FORMAT`.
    16331637
    16341638.. setting:: SHORT_DATETIME_FORMAT
    16351639
     
    16451649corresponding locale-dictated format has higher precedence and will be applied.
    16461650See :tfilter:`allowed date format strings <date>`.
    16471651
    1648 See also ``DATE_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
     1652See also :setting:`DATE_FORMAT` and :setting:`SHORT_DATETIME_FORMAT`.
    16491653
    16501654.. setting:: SIGNING_BACKEND
    16511655
     
    17671771report contains the relevant snippet of the template, with the appropriate line
    17681772highlighted.
    17691773
    1770 Note that Django only displays fancy error pages if ``DEBUG`` is ``True``, so
     1774Note that Django only displays fancy error pages if :setting:`DEBUG` is ``True``, so
    17711775you'll want to set that to take advantage of this setting.
    17721776
    1773 See also ``DEBUG``.
     1777See also :setting:`DEBUG`.
    17741778
    17751779.. setting:: TEMPLATE_DIRS
    17761780
     
    18021806
    18031807.. versionchanged:: 1.2
    18041808    The class-based API for template loaders was introduced in Django 1.2
    1805     although  the ``TEMPLATE_LOADERS`` setting will accept strings that specify
     1809    although  the :setting:`TEMPLATE_LOADERS` setting will accept strings that specify
    18061810    function-based loaders until compatibility with them is completely removed in
    18071811    Django 1.4.
    18081812
     
    18381842
    18391843.. versionadded:: 1.2
    18401844
    1841 Default ``,`` (Comma)
     1845Default: ``,`` (Comma)
    18421846
    18431847Default thousand separator used when formatting numbers. This setting is
    1844 used only when ``NUMBER_GROUPING`` and ``USE_THOUSAND_SEPARATOR`` are set.
     1848used only when :setting:`NUMBER_GROUPING` and :setting:`USE_THOUSAND_SEPARATOR` are set.
    18451849
    18461850See also :setting:`NUMBER_GROUPING`, :setting:`DECIMAL_SEPARATOR` and
    18471851:setting:`USE_THOUSAND_SEPARATOR`.
     
    18591863:tfilter:`allowed date format strings <date>`.
    18601864
    18611865.. versionchanged:: 1.2
    1862     This setting can now be overriden by setting ``USE_L10N`` to ``True``.
     1866    This setting can now be overriden by setting :setting:`USE_L10N` to ``True``.
    18631867
    1864 See also ``DATE_FORMAT`` and ``DATETIME_FORMAT``.
     1868See also :setting:`DATE_FORMAT` and :setting:`DATETIME_FORMAT`.
    18651869
    18661870.. setting:: TIME_INPUT_FORMATS
    18671871
     
    18781882syntax, that is different from the one used by Django for formatting dates
    18791883to be displayed.
    18801884
    1881 See also ``DATE_INPUT_FORMATS`` and ``DATETIME_INPUT_FORMATS``.
     1885See also :setting:`DATE_INPUT_FORMATS` and :setting:`DATETIME_INPUT_FORMATS`.
    18821886
    18831887.. _datetime: http://docs.python.org/library/datetime.html#strftime-strptime-behavior
    18841888
     
    18971901choices lists more than one on the same line; you'll want to use just
    18981902one of the choices for a given time zone. For instance, one line says
    18991903``'Europe/London GB GB-Eire'``, but you should use the first bit of
    1900 that -- ``'Europe/London'`` -- as your ``TIME_ZONE`` setting.)
     1904that -- ``'Europe/London'`` -- as your :setting:`TIME_ZONE` setting.)
    19011905
    19021906Note that this is the time zone to which Django will convert all
    19031907dates/times -- not necessarily the timezone of the server. For
     
    19051909a separate time-zone setting.
    19061910
    19071911Normally, Django sets the ``os.environ['TZ']`` variable to the time
    1908 zone you specify in the ``TIME_ZONE`` setting. Thus, all your views
     1912zone you specify in the :setting:`TIME_ZONE` setting. Thus, all your views
    19091913and models will automatically operate in the correct time zone.
    19101914However, Django won't set the ``TZ`` environment variable under the
    19111915following conditions:
     
    19621966set to ``False``, Django will make some optimizations so as not to load the
    19631967internationalization machinery.
    19641968
    1965 See also ``USE_L10N``
     1969See also :setting:`USE_L10N`
    19661970
    19671971.. setting:: USE_L10N
    19681972
     
    19711975
    19721976.. versionadded:: 1.2
    19731977
    1974 Default ``False``
     1978Default: ``False``
    19751979
    19761980A boolean that specifies if data will be localized by default or not. If this
    19771981is set to ``True``, e.g. Django will display numbers and dates using the
    19781982format of the current locale.
    19791983
    1980 See also ``USE_I18N`` and ``LANGUAGE_CODE``
     1984See also :setting:`USE_I18N` and :setting:`LANGUAGE_CODE`
    19811985
    19821986.. setting:: USE_THOUSAND_SEPARATOR
    19831987
     
    19861990
    19871991.. versionadded:: 1.2
    19881992
    1989 Default ``False``
     1993Default: ``False``
    19901994
    19911995A boolean that specifies wheter to display numbers using a thousand separator.
    1992 If this is set to ``True``, Django will use values from ``THOUSAND_SEPARATOR``
    1993 and ``NUMBER_GROUPING`` from current locale, to format the number.
    1994 ``USE_L10N`` must be set to ``True``, in order to format numbers.
     1996If this is set to ``True``, Django will use values from :setting:`THOUSAND_SEPARATOR`
     1997and :setting:`NUMBER_GROUPING` from current locale, to format the number.
     1998:setting:`USE_L10N` must be set to ``True``, in order to format numbers.
    19951999
    1996 See also ``THOUSAND_SEPARATOR`` and ``NUMBER_GROUPING``.
     2000See also :setting:`THOUSAND_SEPARATOR` and :setting:`NUMBER_GROUPING`.
    19972001
    19982002.. setting:: YEAR_MONTH_FORMAT
    19992003
     
    20112015Different locales have different formats. For example, U.S. English would say
    20122016"January 2006," whereas another locale might say "2006/January."
    20132017
    2014 See :tfilter:`allowed date format strings <date>`. See also ``DATE_FORMAT``,
    2015 ``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``MONTH_DAY_FORMAT``.
     2018See :tfilter:`allowed date format strings <date>`. See also :setting:`DATE_FORMAT`,
     2019:setting:`DATETIME_FORMAT`, :setting:`TIME_FORMAT` and :setting:`MONTH_DAY_FORMAT`.
    20162020
    20172021Deprecated settings
    20182022===================
  • docs/ref/utils.txt

     
    6161
    6262    Each header is only added if it isn't already set.
    6363
    64     ``cache_timeout`` is in seconds. The ``CACHE_MIDDLEWARE_SECONDS`` setting
     64    ``cache_timeout`` is in seconds. The :setting:`CACHE_MIDDLEWARE_SECONDS` setting
    6565    is used by default.
    6666
    6767.. function:: add_never_cache_headers(response)
Back to Top