Ticket #14633: settings-002.diff

File settings-002.diff, 21.9 KB (added by adamv, 5 years ago)

More tweaks, includes markup app

  • docs/ref/contrib/comments/index.txt

    diff --git a/docs/ref/contrib/comments/index.txt b/docs/ref/contrib/comments/index.txt
    index 817871e..e9b14c1 100644
    a b To get started using the ``comments`` app, follow these steps: 
    4040    #. Use the `comment template tags`_ below to embed comments in your
    4141       templates.
    4242
    43 You might also want to examine :doc:`/ref/contrib/comments/settings`.
     43You might also want to examine :ref:`the available settings <settings-comments>`.
    4444
    4545Comment template tags
    4646=====================
    output the CSRF token and cookie. 
    286286
    287287.. _honeypot: http://en.wikipedia.org/wiki/Honeypot_(computing)
    288288
     289
     290Configuration
     291=============
     292
     293See: :ref:`comment settings <settings-comments>`
     294
     295
    289296More information
    290297================
    291298
    More information 
    293300   :maxdepth: 1
    294301
    295302   models
    296    settings
    297303   signals
    298304   upgrade
    299305   custom
  • deleted file docs/ref/contrib/comments/settings.txt

    diff --git a/docs/ref/contrib/comments/settings.txt b/docs/ref/contrib/comments/settings.txt
    deleted file mode 100644
    index 1f1aeca..0000000
    + -  
    1 ================
    2 Comment settings
    3 ================
    4 
    5 These settings configure the behavior of the comments framework:
    6 
    7 .. setting:: COMMENTS_HIDE_REMOVED
    8 
    9 COMMENTS_HIDE_REMOVED
    10 ---------------------
    11 
    12 If ``True`` (default), removed comments will be excluded from comment
    13 lists/counts (as taken from template tags). Otherwise, the template author is
    14 responsible for some sort of a "this comment has been removed by the site staff"
    15 message.
    16 
    17 .. setting:: COMMENT_MAX_LENGTH
    18 
    19 COMMENT_MAX_LENGTH
    20 ------------------
    21 
    22 The maximum length of the comment field, in characters. Comments longer than
    23 this will be rejected. Defaults to 3000.
    24 
    25 .. setting:: COMMENTS_APP
    26 
    27 COMMENTS_APP
    28 ------------
    29 
    30 An app which provides :doc:`customization of the comments framework
    31 </ref/contrib/comments/custom>`.  Use the same dotted-string notation
    32 as in :setting:`INSTALLED_APPS`.  Your custom :setting:`COMMENTS_APP`
    33 must also be listed in :setting:`INSTALLED_APPS`.
  • docs/ref/contrib/messages.txt

    diff --git a/docs/ref/contrib/messages.txt b/docs/ref/contrib/messages.txt
    index 3081f27..a7ddb6c 100644
    a b Storage backends 
    5757----------------
    5858
    5959The messages framework can use different backends to store temporary messages.
    60 To change which backend is being used, add a `MESSAGE_STORAGE`_ to your
     60To change which backend is being used, add a :setting:`MESSAGE_STORAGE` to your
    6161settings, referencing the module and class of the storage class. For
    6262example::
    6363
    first, followed by those stored in a cookie and in the session, if any. Since 
    114114messages stored in the ``Message`` model do not have a concept of levels, they
    115115will be assigned the ``INFO`` level by default.
    116116
     117.. _message-level:
     118
    117119Message levels
    118120--------------
    119121
    Constant Purpose 
    135137``ERROR``   An action was **not** successful or some other failure occurred
    136138=========== ========
    137139
    138 The `MESSAGE_LEVEL`_ setting can be used to change the minimum recorded level
     140The :setting:`MESSAGE_LEVEL` setting can be used to change the minimum recorded level
    139141(or it can be `changed per request`_). Attempts to add messages of a level less
    140142than this will be ignored.
    141143
    Level Constant Tag 
    163165==============  ===========
    164166
    165167To change the default tags for a message level (either built-in or custom),
    166 set the `MESSAGE_TAGS`_ setting to a dictionary containing the levels
     168set the :setting:`MESSAGE_TAGS` setting to a dictionary containing the levels
    167169you wish to change. As this extends the default tags, you only need to provide
    168170tags for the levels you wish to override::
    169171
    used tags (which are usually represented as HTML classes for the message):: 
    193195    messages.warning(request, 'Your account expires in three days.')
    194196    messages.error(request, 'Document deleted.')
    195197
     198.. _message-displaying:
     199
    196200Displaying messages
    197201-------------------
    198202
    Level Constant Value 
    237241==============  =====
    238242
    239243If you need to identify the custom levels in your HTML or CSS, you need to
    240 provide a mapping via the `MESSAGE_TAGS`_ setting.
     244provide a mapping via the :setting:`MESSAGE_TAGS` setting.
    241245
    242246.. note::
    243247   If you are creating a reusable application, it is recommended to use
    window/tab will have its own browsing context. 
    341345Settings
    342346========
    343347
    344 A few :doc:`Django settings </ref/settings>` give you control over message
    345 behavior:
    346 
    347 MESSAGE_LEVEL
    348 -------------
    349 
    350 Default: ``messages.INFO``
    351 
    352 This sets the minimum message that will be saved in the message storage.  See
    353 `Message levels`_ above for more details.
    354 
    355 .. admonition:: Important
    356 
    357    If you override ``MESSAGE_LEVEL`` in your settings file and rely on any of
    358    the built-in constants, you must import the constants module directly to
    359    avoid the potential for circular imports, e.g.::
    360 
    361        from django.contrib.messages import constants as message_constants
    362        MESSAGE_LEVEL = message_constants.DEBUG
    363 
    364    If desired, you may specify the numeric values for the constants directly
    365    according to the values in the above :ref:`constants table
    366    <message-level-constants>`.
    367 
    368 MESSAGE_STORAGE
    369 ---------------
    370 
    371 Default: ``'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'``
    372 
    373 Controls where Django stores message data. Valid values are:
    374 
    375     * ``'django.contrib.messages.storage.fallback.FallbackStorage'``
    376     * ``'django.contrib.messages.storage.session.SessionStorage'``
    377     * ``'django.contrib.messages.storage.cookie.CookieStorage'``
    378     * ``'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'``
    379 
    380 See `Storage backends`_ for more details.
    381 
    382 MESSAGE_TAGS
    383 ------------
    384 
    385 Default::
    386 
    387         {messages.DEBUG: 'debug',
    388         messages.INFO: 'info',
    389         messages.SUCCESS: 'success',
    390         messages.WARNING: 'warning',
    391         messages.ERROR: 'error',}
    392 
    393 This sets the mapping of message level to message tag, which is typically
    394 rendered as a CSS class in HTML. If you specify a value, it will extend
    395 the default. This means you only have to specify those values which you need
    396 to override. See `Displaying messages`_ above for more details.
    397 
    398 .. admonition:: Important
    399 
    400    If you override ``MESSAGE_TAGS`` in your settings file and rely on any of
    401    the built-in constants, you must import the ``constants`` module directly to
    402    avoid the potential for circular imports, e.g.::
    403 
    404        from django.contrib.messages import constants as message_constants
    405        MESSAGE_TAGS = {message_constants.INFO: ''}
    406 
    407    If desired, you may specify the numeric values for the constants directly
    408    according to the values in the above :ref:`constants table
    409    <message-level-constants>`.
    410 
    411 .. _Django settings: ../settings/
     348A few settings give you control over message behavior. See
     349:ref:`Messages settings <settings-messages>`.
  • docs/ref/settings.txt

    diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
    index 380fa78..9f7cd01 100644
    a b Settings 
    66    :local:
    77    :depth: 1
    88
    9 Available settings
    10 ==================
     9Core settings
     10=============
    1111
    12 Here's a full list of all available settings, in alphabetical order, and their
    13 default values.
     12Here's a list of settings available in Django core, and their default values.
     13Settings provided by contrib apps are listed below.
    1414
    1515.. setting:: ABSOLUTE_URL_OVERRIDES
    1616
    The ``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
    109 .. setting:: AUTHENTICATION_BACKENDS
    110 
    111 AUTHENTICATION_BACKENDS
    112 -----------------------
    113 
    114 Default: ``('django.contrib.auth.backends.ModelBackend',)``
    115 
    116 A tuple of authentication backend classes (as strings) to use when attempting to
    117 authenticate a user. See the :doc:`authentication backends documentation
    118 </ref/authbackends>` for details.
    119 
    120109.. setting:: AUTH_PROFILE_MODULE
    121110
    122111AUTH_PROFILE_MODULE
    Default: ``()`` (Empty tuple) 
    12991288A tuple of profanities, as strings, that will trigger a validation error when
    13001289the ``hasNoProfanities`` validator is called.
    13011290
    1302 .. setting:: RESTRUCTUREDTEXT_FILTER_SETTINGS
    1303 
    1304 RESTRUCTUREDTEXT_FILTER_SETTINGS
    1305 --------------------------------
    1306 
    1307 Default: ``{}``
    1308 
    1309 A dictionary containing settings for the ``restructuredtext`` markup filter from
    1310 the :doc:`django.contrib.markup application </ref/contrib/markup>`. They override
    1311 the default writer settings. See the Docutils restructuredtext `writer settings
    1312 docs`_ for details.
    1313 
    1314 .. _writer settings docs: http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer
    1315 
    13161291.. setting:: ROOT_URLCONF
    13171292
    13181293ROOT_URLCONF
    Default: ``'root@localhost'`` 
    13721347The e-mail address that error messages come from, such as those sent to
    13731348``ADMINS`` and ``MANAGERS``.
    13741349
    1375 .. setting:: SESSION_COOKIE_AGE
    1376 
    1377 SESSION_COOKIE_AGE
    1378 ------------------
    1379 
    1380 Default: ``1209600`` (2 weeks, in seconds)
    1381 
    1382 The age of session cookies, in seconds. See :doc:`/topics/http/sessions`.
    1383 
    1384 .. setting:: SESSION_COOKIE_DOMAIN
    1385 
    1386 SESSION_COOKIE_DOMAIN
    1387 ---------------------
    1388 
    1389 Default: ``None``
    1390 
    1391 The domain to use for session cookies. Set this to a string such as
    1392 ``".lawrence.com"`` for cross-domain cookies, or use ``None`` for a standard
    1393 domain cookie. See the :doc:`/topics/http/sessions`.
    1394 
    1395 .. setting:: SESSION_COOKIE_HTTPONLY
    1396 
    1397 SESSION_COOKIE_HTTPONLY
    1398 -----------------------
    1399 
    1400 Default: ``False``
    1401 
    1402 Whether to use HTTPOnly flag on the session cookie. If this is set to
    1403 ``True``, client-side JavaScript will not to be able to access the
    1404 session cookie.
    1405 
    1406 HTTPOnly_ is a flag included in a Set-Cookie HTTP response header. It
    1407 is not part of the RFC2109 standard for cookies, and it isn't honored
    1408 consistently by all browsers. However, when it is honored, it can be a
    1409 useful way to mitigate the risk of client side script accessing the
    1410 protected cookie data.
    1411 
    1412 .. _HTTPOnly: http://www.owasp.org/index.php/HTTPOnly
    1413 
    1414 .. setting:: SESSION_COOKIE_NAME
    1415 
    1416 SESSION_COOKIE_NAME
    1417 -------------------
    1418 
    1419 Default: ``'sessionid'``
    1420 
    1421 The name of the cookie to use for sessions. This can be whatever you want (but
    1422 should be different from ``LANGUAGE_COOKIE_NAME``). See the :doc:`/topics/http/sessions`.
    1423 
    1424 .. setting:: SESSION_COOKIE_PATH
    1425 
    1426 SESSION_COOKIE_PATH
    1427 -------------------
    1428 
    1429 .. versionadded:: 1.0
    1430 
    1431 Default: ``'/'``
    1432 
    1433 The path set on the session cookie. This should either match the URL path of your
    1434 Django installation or be parent of that path.
    1435 
    1436 This is useful if you have multiple Django instances running under the same
    1437 hostname. They can use different cookie paths, and each instance will only see
    1438 its own session cookie.
    1439 
    1440 .. setting:: SESSION_COOKIE_SECURE
    1441 
    1442 SESSION_COOKIE_SECURE
    1443 ---------------------
    1444 
    1445 Default: ``False``
    1446 
    1447 Whether to use a secure cookie for the session cookie. If this is set to
    1448 ``True``, the cookie will be marked as "secure," which means browsers may
    1449 ensure that the cookie is only sent under an HTTPS connection.
    1450 See the :doc:`/topics/http/sessions`.
    1451 
    1452 .. setting:: SESSION_ENGINE
    1453 
    1454 SESSION_ENGINE
    1455 --------------
    1456 
    1457 .. versionadded:: 1.0
    1458 
    1459 .. versionchanged:: 1.1
    1460    The ``cached_db`` backend was added
    1461 
    1462 Default: ``django.contrib.sessions.backends.db``
    1463 
    1464 Controls where Django stores session data. Valid values are:
    1465 
    1466     * ``'django.contrib.sessions.backends.db'``
    1467     * ``'django.contrib.sessions.backends.file'``
    1468     * ``'django.contrib.sessions.backends.cache'``
    1469     * ``'django.contrib.sessions.backends.cached_db'``
    1470 
    1471 See :doc:`/topics/http/sessions`.
    1472 
    1473 .. setting:: SESSION_EXPIRE_AT_BROWSER_CLOSE
    1474 
    1475 SESSION_EXPIRE_AT_BROWSER_CLOSE
    1476 -------------------------------
    1477 
    1478 Default: ``False``
    1479 
    1480 Whether to expire the session when the user closes his or her browser.
    1481 See the :doc:`/topics/http/sessions`.
    1482 
    1483 .. setting:: SESSION_FILE_PATH
    1484 
    1485 SESSION_FILE_PATH
    1486 -----------------
    1487 
    1488 .. versionadded:: 1.0
    1489 
    1490 Default: ``None``
    1491 
    1492 If you're using file-based session storage, this sets the directory in
    1493 which Django will store session data. See :doc:`/topics/http/sessions`. When
    1494 the default value (``None``) is used, Django will use the standard temporary
    1495 directory for the system.
    1496 
    1497 .. setting:: SESSION_SAVE_EVERY_REQUEST
    1498 
    1499 SESSION_SAVE_EVERY_REQUEST
    1500 --------------------------
    1501 
    1502 Default: ``False``
    1503 
    1504 Whether to save the session data on every request. See
    1505 :doc:`/topics/http/sessions`.
    1506 
    15071350.. setting:: SHORT_DATE_FORMAT
    15081351
    15091352SHORT_DATE_FORMAT
    See :tfilter:`allowed date format strings <date>`. 
    15361379
    15371380See also ``DATE_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
    15381381
    1539 .. setting:: SITE_ID
    1540 
    1541 SITE_ID
    1542 -------
    1543 
    1544 Default: Not defined
    1545 
    1546 The ID, as an integer, of the current site in the ``django_site`` database
    1547 table. This is used so that application data can hook into specific site(s)
    1548 and a single database can manage content for multiple sites.
    1549 
    1550 See :doc:`/ref/contrib/sites`.
    1551 
    1552 .. _site framework docs: ../sites/
    1553 
    15541382.. setting:: STATIC_ROOT
    15551383
    15561384STATIC_ROOT
    Different locales have different formats. For example, U.S. English would say 
    18781706See :tfilter:`allowed date format strings <date>`. See also ``DATE_FORMAT``,
    18791707``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``MONTH_DAY_FORMAT``.
    18801708
     1709
     1710Contrib settings
     1711================
     1712
     1713Settings provided by contrib apps are grouped by app below.
     1714
     1715Auth
     1716----
     1717
     1718Settings for :mod:`django.contrib.auth`.
     1719
     1720.. setting:: AUTHENTICATION_BACKENDS
     1721
     1722AUTHENTICATION_BACKENDS
     1723~~~~~~~~~~~~~~~~~~~~~~~
     1724
     1725Default: ``('django.contrib.auth.backends.ModelBackend',)``
     1726
     1727A tuple of authentication backend classes (as strings) to use when attempting to
     1728authenticate a user. See the :doc:`authentication backends documentation
     1729</ref/authbackends>` for details.
     1730
     1731.. _settings-comments:
     1732
     1733Comments
     1734--------
     1735
     1736Settings for :mod:`django.contrib.comments`.
     1737
     1738.. setting:: COMMENT_MAX_LENGTH
     1739
     1740COMMENT_MAX_LENGTH
     1741~~~~~~~~~~~~~~~~~~
     1742
     1743Default: ``3000`` (characters)
     1744
     1745The maximum length of the comment field, in characters. Comments longer than
     1746this will be rejected.
     1747
     1748.. setting:: COMMENTS_APP
     1749
     1750COMMENTS_APP
     1751~~~~~~~~~~~~
     1752
     1753An app which provides :doc:`customization of the comments framework
     1754</ref/contrib/comments/custom>`.  Use the same dotted-string notation
     1755as in :setting:`INSTALLED_APPS`.  Your custom :setting:`COMMENTS_APP`
     1756must also be listed in :setting:`INSTALLED_APPS`.
     1757
     1758.. setting:: COMMENTS_HIDE_REMOVED
     1759
     1760COMMENTS_HIDE_REMOVED
     1761~~~~~~~~~~~~~~~~~~~~~
     1762
     1763Default: ``True``
     1764
     1765If ``True``, removed comments will be excluded from comment
     1766lists and counts (as taken from template tags). Otherwise, the template author
     1767isresponsible for some sort of a "this comment has been removed by the site
     1768staff" message.
     1769
     1770
     1771Markup
     1772------
     1773
     1774Settings for :mod:`django.contrib.markup`.
     1775
     1776.. setting:: RESTRUCTUREDTEXT_FILTER_SETTINGS
     1777
     1778RESTRUCTUREDTEXT_FILTER_SETTINGS
     1779~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1780
     1781Default: ``{}``
     1782
     1783A dictionary containing settings for the ``restructuredtext`` markup filter from
     1784the :doc:`django.contrib.markup application </ref/contrib/markup>`. They override
     1785the default writer settings. See the Docutils restructuredtext `writer settings
     1786docs`_ for details.
     1787
     1788.. _writer settings docs: http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer
     1789
     1790
     1791.. _settings-messages:
     1792
     1793Messages
     1794--------
     1795
     1796Settings for :mod:`django.contrib.messages`.
     1797
     1798.. setting:: MESSAGE_LEVEL
     1799
     1800MESSAGE_LEVEL
     1801~~~~~~~~~~~~~
     1802
     1803Default: ``messages.INFO``
     1804
     1805This sets the minimum message that will be saved in the message storage.  See
     1806:ref:`message levels <message-level>` for more details.
     1807
     1808.. admonition:: Important
     1809
     1810   If you override ``MESSAGE_LEVEL`` in your settings file and rely on any of
     1811   the built-in constants, you must import the constants module directly to
     1812   avoid the potential for circular imports, e.g.::
     1813
     1814       from django.contrib.messages import constants as message_constants
     1815       MESSAGE_LEVEL = message_constants.DEBUG
     1816
     1817   If desired, you may specify the numeric values for the constants directly
     1818   according to the values in the :ref:`constants table
     1819   <message-level-constants>`.
     1820
     1821.. setting:: MESSAGE_STORAGE
     1822
     1823MESSAGE_STORAGE
     1824~~~~~~~~~~~~~~~
     1825
     1826Default: ``'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'``
     1827
     1828Controls where Django stores message data. Valid values are:
     1829
     1830    * ``'django.contrib.messages.storage.fallback.FallbackStorage'``
     1831    * ``'django.contrib.messages.storage.session.SessionStorage'``
     1832    * ``'django.contrib.messages.storage.cookie.CookieStorage'``
     1833    * ``'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'``
     1834
     1835See :ref:`message storage backends <message-storage-backends>` for more details.
     1836
     1837.. setting:: MESSAGE_TAGS
     1838
     1839MESSAGE_TAGS
     1840~~~~~~~~~~~~
     1841
     1842Default::
     1843
     1844        {messages.DEBUG: 'debug',
     1845        messages.INFO: 'info',
     1846        messages.SUCCESS: 'success',
     1847        messages.WARNING: 'warning',
     1848        messages.ERROR: 'error',}
     1849
     1850This sets the mapping of message level to message tag, which is typically
     1851rendered as a CSS class in HTML. If you specify a value, it will extend
     1852the default. This means you only have to specify those values which you need
     1853to override. See :ref:`displaying messages <message-displaying>` for more details.
     1854
     1855.. admonition:: Important
     1856
     1857   If you override ``MESSAGE_TAGS`` in your settings file and rely on any of
     1858   the built-in constants, you must import the ``constants`` module directly to
     1859   avoid the potential for circular imports, e.g.::
     1860
     1861       from django.contrib.messages import constants as message_constants
     1862       MESSAGE_TAGS = {message_constants.INFO: ''}
     1863
     1864   If desired, you may specify the numeric values for the constants directly
     1865   according to the values in the above :ref:`constants table
     1866   <message-level-constants>`.
     1867
     1868
     1869Sessions
     1870--------
     1871
     1872Settings for :mod:`django.contrib.sessions`.
     1873
     1874.. setting:: SESSION_COOKIE_AGE
     1875
     1876SESSION_COOKIE_AGE
     1877~~~~~~~~~~~~~~~~~~
     1878
     1879Default: ``1209600`` (2 weeks, in seconds)
     1880
     1881The age of session cookies, in seconds. See :doc:`/topics/http/sessions`.
     1882
     1883.. setting:: SESSION_COOKIE_DOMAIN
     1884
     1885SESSION_COOKIE_DOMAIN
     1886~~~~~~~~~~~~~~~~~~~~~
     1887
     1888Default: ``None``
     1889
     1890The domain to use for session cookies. Set this to a string such as
     1891``".lawrence.com"`` for cross-domain cookies, or use ``None`` for a standard
     1892domain cookie. See the :doc:`/topics/http/sessions`.
     1893
     1894.. setting:: SESSION_COOKIE_HTTPONLY
     1895
     1896SESSION_COOKIE_HTTPONLY
     1897~~~~~~~~~~~~~~~~~~~~~~~
     1898
     1899Default: ``False``
     1900
     1901Whether to use HTTPOnly flag on the session cookie. If this is set to
     1902``True``, client-side JavaScript will not to be able to access the
     1903session cookie.
     1904
     1905HTTPOnly_ is a flag included in a Set-Cookie HTTP response header. It
     1906is not part of the RFC2109 standard for cookies, and it isn't honored
     1907consistently by all browsers. However, when it is honored, it can be a
     1908useful way to mitigate the risk of client side script accessing the
     1909protected cookie data.
     1910
     1911.. _HTTPOnly: http://www.owasp.org/index.php/HTTPOnly
     1912
     1913.. setting:: SESSION_COOKIE_NAME
     1914
     1915SESSION_COOKIE_NAME
     1916~~~~~~~~~~~~~~~~~~~
     1917
     1918Default: ``'sessionid'``
     1919
     1920The name of the cookie to use for sessions. This can be whatever you want (but
     1921should be different from ``LANGUAGE_COOKIE_NAME``). See the :doc:`/topics/http/sessions`.
     1922
     1923.. setting:: SESSION_COOKIE_PATH
     1924
     1925SESSION_COOKIE_PATH
     1926~~~~~~~~~~~~~~~~~~~
     1927
     1928.. versionadded:: 1.0
     1929
     1930Default: ``'/'``
     1931
     1932The path set on the session cookie. This should either match the URL path of your
     1933Django installation or be parent of that path.
     1934
     1935This is useful if you have multiple Django instances running under the same
     1936hostname. They can use different cookie paths, and each instance will only see
     1937its own session cookie.
     1938
     1939.. setting:: SESSION_COOKIE_SECURE
     1940
     1941SESSION_COOKIE_SECURE
     1942~~~~~~~~~~~~~~~~~~~~~
     1943
     1944Default: ``False``
     1945
     1946Whether to use a secure cookie for the session cookie. If this is set to
     1947``True``, the cookie will be marked as "secure," which means browsers may
     1948ensure that the cookie is only sent under an HTTPS connection.
     1949See the :doc:`/topics/http/sessions`.
     1950
     1951.. setting:: SESSION_ENGINE
     1952
     1953SESSION_ENGINE
     1954~~~~~~~~~~~~~~
     1955
     1956.. versionadded:: 1.0
     1957
     1958.. versionchanged:: 1.1
     1959   The ``cached_db`` backend was added
     1960
     1961Default: ``django.contrib.sessions.backends.db``
     1962
     1963Controls where Django stores session data. Valid values are:
     1964
     1965    * ``'django.contrib.sessions.backends.db'``
     1966    * ``'django.contrib.sessions.backends.file'``
     1967    * ``'django.contrib.sessions.backends.cache'``
     1968    * ``'django.contrib.sessions.backends.cached_db'``
     1969
     1970See :doc:`/topics/http/sessions`.
     1971
     1972.. setting:: SESSION_EXPIRE_AT_BROWSER_CLOSE
     1973
     1974SESSION_EXPIRE_AT_BROWSER_CLOSE
     1975~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1976
     1977Default: ``False``
     1978
     1979Whether to expire the session when the user closes his or her browser.
     1980See the :doc:`/topics/http/sessions`.
     1981
     1982.. setting:: SESSION_FILE_PATH
     1983
     1984SESSION_FILE_PATH
     1985~~~~~~~~~~~~~~~~~
     1986
     1987.. versionadded:: 1.0
     1988
     1989Default: ``None``
     1990
     1991If you're using file-based session storage, this sets the directory in
     1992which Django will store session data. See :doc:`/topics/http/sessions`. When
     1993the default value (``None``) is used, Django will use the standard temporary
     1994directory for the system.
     1995
     1996.. setting:: SESSION_SAVE_EVERY_REQUEST
     1997
     1998SESSION_SAVE_EVERY_REQUEST
     1999~~~~~~~~~~~~~~~~~~~~~~~~~~
     2000
     2001Default: ``False``
     2002
     2003Whether to save the session data on every request. See
     2004:doc:`/topics/http/sessions`.
     2005
     2006Sites
     2007-----
     2008
     2009Settings for :mod:`django.contrib.sites`.
     2010
     2011.. setting:: SITE_ID
     2012
     2013SITE_ID
     2014~~~~~~~
     2015
     2016Default: Not defined
     2017
     2018The ID, as an integer, of the current site in the ``django_site`` database
     2019table. This is used so that application data can hook into specific sites
     2020and a single database can manage content for multiple sites.
     2021
     2022
    18812023Deprecated settings
    18822024===================
    18832025
     2026The settings in this section are deprecated.
     2027
    18842028.. setting:: DATABASE_ENGINE
    18852029
    18862030DATABASE_ENGINE
    TEST_DATABASE_NAME 
    19702114.. deprecated:: 1.2
    19712115   This setting has been replaced by :setting:`TEST_NAME` in
    19722116   :setting:`DATABASES`.
    1973 
Back to Top