parts/django/docs/ref/settings.txt
changeset 69 c6bca38c1cbf
equal deleted inserted replaced
68:5ff1fc726848 69:c6bca38c1cbf
       
     1 ========
       
     2 Settings
       
     3 ========
       
     4 
       
     5 .. contents::
       
     6     :local:
       
     7     :depth: 1
       
     8 
       
     9 Available settings
       
    10 ==================
       
    11 
       
    12 Here's a full list of all available settings, in alphabetical order, and their
       
    13 default values.
       
    14 
       
    15 .. setting:: ABSOLUTE_URL_OVERRIDES
       
    16 
       
    17 ABSOLUTE_URL_OVERRIDES
       
    18 ----------------------
       
    19 
       
    20 Default: ``{}`` (Empty dictionary)
       
    21 
       
    22 A dictionary mapping ``"app_label.model_name"`` strings to functions that take
       
    23 a model object and return its URL. This is a way of overriding
       
    24 ``get_absolute_url()`` methods on a per-installation basis. Example::
       
    25 
       
    26     ABSOLUTE_URL_OVERRIDES = {
       
    27         'blogs.weblog': lambda o: "/blogs/%s/" % o.slug,
       
    28         'news.story': lambda o: "/stories/%s/%s/" % (o.pub_year, o.slug),
       
    29     }
       
    30 
       
    31 Note that the model name used in this setting should be all lower-case, regardless
       
    32 of the case of the actual model class name.
       
    33 
       
    34 .. setting:: ADMIN_FOR
       
    35 
       
    36 ADMIN_FOR
       
    37 ---------
       
    38 
       
    39 Default: ``()`` (Empty tuple)
       
    40 
       
    41 Used for admin-site settings modules, this should be a tuple of settings
       
    42 modules (in the format ``'foo.bar.baz'``) for which this site is an admin.
       
    43 
       
    44 The admin site uses this in its automatically-introspected documentation of
       
    45 models, views and template tags.
       
    46 
       
    47 .. setting:: ADMIN_MEDIA_PREFIX
       
    48 
       
    49 ADMIN_MEDIA_PREFIX
       
    50 ------------------
       
    51 
       
    52 Default: ``'/media/'``
       
    53 
       
    54 The URL prefix for admin media -- CSS, JavaScript and images used by
       
    55 the Django administrative interface. Make sure to use a trailing
       
    56 slash, and to have this be different from the ``MEDIA_URL`` setting
       
    57 (since the same URL cannot be mapped onto two different sets of
       
    58 files).
       
    59 
       
    60 .. setting:: ADMINS
       
    61 
       
    62 ADMINS
       
    63 ------
       
    64 
       
    65 Default: ``()`` (Empty tuple)
       
    66 
       
    67 A tuple that lists people who get code error notifications. When
       
    68 ``DEBUG=False`` and a view raises an exception, Django will e-mail these people
       
    69 with the full exception information. Each member of the tuple should be a tuple
       
    70 of (Full name, e-mail address). Example::
       
    71 
       
    72     (('John', 'john@example.com'), ('Mary', 'mary@example.com'))
       
    73 
       
    74 Note that Django will e-mail *all* of these people whenever an error happens.
       
    75 See :doc:`/howto/error-reporting` for more information.
       
    76 
       
    77 .. setting:: ALLOWED_INCLUDE_ROOTS
       
    78 
       
    79 ALLOWED_INCLUDE_ROOTS
       
    80 ---------------------
       
    81 
       
    82 Default: ``()`` (Empty tuple)
       
    83 
       
    84 A tuple of strings representing allowed prefixes for the ``{% ssi %}`` template
       
    85 tag. This is a security measure, so that template authors can't access files
       
    86 that they shouldn't be accessing.
       
    87 
       
    88 For example, if ``ALLOWED_INCLUDE_ROOTS`` is ``('/home/html', '/var/www')``,
       
    89 then ``{% ssi /home/html/foo.txt %}`` would work, but ``{% ssi /etc/passwd %}``
       
    90 wouldn't.
       
    91 
       
    92 .. setting:: APPEND_SLASH
       
    93 
       
    94 APPEND_SLASH
       
    95 ------------
       
    96 
       
    97 Default: ``True``
       
    98 
       
    99 When set to ``True``, if the request URL does not match any of the patterns
       
   100 in the URLconf and it doesn't end in a slash, an HTTP redirect is issued to the
       
   101 same URL with a slash appended. Note that the redirect may cause any data
       
   102 submitted in a POST request to be lost.
       
   103 
       
   104 The ``APPEND_SLASH`` setting is only used if
       
   105 :class:`~django.middleware.common.CommonMiddleware` is installed
       
   106 (see :doc:`/topics/http/middleware`). See also :setting:`PREPEND_WWW`.
       
   107 
       
   108 .. setting:: AUTHENTICATION_BACKENDS
       
   109 
       
   110 AUTHENTICATION_BACKENDS
       
   111 -----------------------
       
   112 
       
   113 Default: ``('django.contrib.auth.backends.ModelBackend',)``
       
   114 
       
   115 A tuple of authentication backend classes (as strings) to use when attempting to
       
   116 authenticate a user. See the :doc:`authentication backends documentation
       
   117 </ref/authbackends>` for details.
       
   118 
       
   119 .. setting:: AUTH_PROFILE_MODULE
       
   120 
       
   121 AUTH_PROFILE_MODULE
       
   122 -------------------
       
   123 
       
   124 Default: Not defined
       
   125 
       
   126 The site-specific user profile model used by this site. See
       
   127 :ref:`auth-profiles`.
       
   128 
       
   129 .. setting:: CACHE_BACKEND
       
   130 
       
   131 CACHE_BACKEND
       
   132 -------------
       
   133 
       
   134 Default: ``'locmem://'``
       
   135 
       
   136 The cache backend to use. See :doc:`/topics/cache`.
       
   137 
       
   138 .. setting:: CACHE_MIDDLEWARE_ANONYMOUS_ONLY
       
   139 
       
   140 CACHE_MIDDLEWARE_ANONYMOUS_ONLY
       
   141 -------------------------------
       
   142 
       
   143 Default: ``False``
       
   144 
       
   145 If the value of this setting is ``True``, only anonymous requests (i.e., not
       
   146 those made by a logged-in user) will be cached.  Otherwise, the middleware
       
   147 caches every page that doesn't have GET or POST parameters.
       
   148 
       
   149 If you set the value of this setting to ``True``, you should make sure you've
       
   150 activated ``AuthenticationMiddleware``.
       
   151 
       
   152 See the :doc:`cache documentation </topics/cache>` for more information.
       
   153 
       
   154 .. setting:: CACHE_MIDDLEWARE_KEY_PREFIX
       
   155 
       
   156 CACHE_MIDDLEWARE_KEY_PREFIX
       
   157 ---------------------------
       
   158 
       
   159 Default: ``''`` (Empty string)
       
   160 
       
   161 The cache key prefix that the cache middleware should use. See
       
   162 :doc:`/topics/cache`.
       
   163 
       
   164 .. setting:: CACHE_MIDDLEWARE_SECONDS
       
   165 
       
   166 CACHE_MIDDLEWARE_SECONDS
       
   167 ------------------------
       
   168 
       
   169 Default: ``600``
       
   170 
       
   171 The default number of seconds to cache a page when the caching middleware or
       
   172 ``cache_page()`` decorator is used.
       
   173 
       
   174 .. setting:: CSRF_COOKIE_DOMAIN
       
   175 
       
   176 CSRF_COOKIE_DOMAIN
       
   177 ------------------
       
   178 
       
   179 .. versionadded:: 1.2
       
   180 
       
   181 Default: ``None``
       
   182 
       
   183 The domain to be used when setting the CSRF cookie.  This can be useful for
       
   184 allowing cross-subdomain requests to be exluded from the normal cross site
       
   185 request forgery protection.  It should be set to a string such as
       
   186 ``".lawrence.com"`` to allow a POST request from a form on one subdomain to be
       
   187 accepted by accepted by a view served from another subdomain.
       
   188 
       
   189 .. setting:: CSRF_COOKIE_NAME
       
   190 
       
   191 CSRF_COOKIE_NAME
       
   192 ----------------
       
   193 
       
   194 .. versionadded:: 1.2
       
   195 
       
   196 Default: ``'csrftoken'``
       
   197 
       
   198 The name of the cookie to use for the CSRF authentication token. This can be whatever you
       
   199 want.  See :doc:`/ref/contrib/csrf`.
       
   200 
       
   201 .. setting:: CSRF_FAILURE_VIEW
       
   202 
       
   203 CSRF_FAILURE_VIEW
       
   204 -----------------
       
   205 
       
   206 .. versionadded:: 1.2
       
   207 
       
   208 Default: ``'django.views.csrf.csrf_failure'``
       
   209 
       
   210 A dotted path to the view function to be used when an incoming request
       
   211 is rejected by the CSRF protection.  The function should have this signature::
       
   212 
       
   213   def csrf_failure(request, reason="")
       
   214 
       
   215 where ``reason`` is a short message (intended for developers or logging, not for
       
   216 end users) indicating the reason the request was rejected.  See
       
   217 :doc:`/ref/contrib/csrf`.
       
   218 
       
   219 
       
   220 .. setting:: DATABASES
       
   221 
       
   222 DATABASES
       
   223 ---------
       
   224 
       
   225 .. versionadded:: 1.2
       
   226 
       
   227 Default: ``{}`` (Empty dictionary)
       
   228 
       
   229 A dictionary containing the settings for all databases to be used with
       
   230 Django. It is a nested dictionary whose contents maps database aliases
       
   231 to a dictionary containing the options for an individual database.
       
   232 
       
   233 The :setting:`DATABASES` setting must configure a ``default`` database;
       
   234 any number of additional databases may also be specified.
       
   235 
       
   236 The simplest possible settings file is for a single-database setup using
       
   237 SQLite. This can be configured using the following::
       
   238 
       
   239     DATABASES = {
       
   240         'default': {
       
   241             'ENGINE': 'django.db.backends.sqlite3',
       
   242             'NAME': 'mydatabase'
       
   243         }
       
   244     }
       
   245 
       
   246 For other database backends, or more complex SQLite configurations, other options
       
   247 will be required. The following inner options are available.
       
   248 
       
   249 .. setting:: ENGINE
       
   250 
       
   251 ENGINE
       
   252 ~~~~~~
       
   253 
       
   254 Default: ``''`` (Empty string)
       
   255 
       
   256 The database backend to use. The built-in database backends are:
       
   257 
       
   258     * ``'django.db.backends.postgresql_psycopg2'``
       
   259     * ``'django.db.backends.postgresql'``
       
   260     * ``'django.db.backends.mysql'``
       
   261     * ``'django.db.backends.sqlite3'``
       
   262     * ``'django.db.backends.oracle'``
       
   263 
       
   264 You can use a database backend that doesn't ship with Django by setting
       
   265 ``ENGINE`` to a fully-qualified path (i.e.
       
   266 ``mypackage.backends.whatever``). Writing a whole new database backend from
       
   267 scratch is left as an exercise to the reader; see the other backends for
       
   268 examples.
       
   269 
       
   270 .. note::
       
   271     Prior to Django 1.2, you could use a short version of the backend name
       
   272     to reference the built-in database backends (e.g., you could use
       
   273     ``'sqlite3'`` to refer to the SQLite backend). This format has been
       
   274     deprecated, and will be removed in Django 1.4.
       
   275 
       
   276 .. setting:: HOST
       
   277 
       
   278 HOST
       
   279 ~~~~
       
   280 
       
   281 Default: ``''`` (Empty string)
       
   282 
       
   283 Which host to use when connecting to the database. An empty string means
       
   284 localhost. Not used with SQLite.
       
   285 
       
   286 If this value starts with a forward slash (``'/'``) and you're using MySQL,
       
   287 MySQL will connect via a Unix socket to the specified socket. For example::
       
   288 
       
   289     "HOST": '/var/run/mysql'
       
   290 
       
   291 If you're using MySQL and this value *doesn't* start with a forward slash, then
       
   292 this value is assumed to be the host.
       
   293 
       
   294 If you're using PostgreSQL, an empty string means to use a Unix domain socket
       
   295 for the connection, rather than a network connection to localhost. If you
       
   296 explicitly need to use a TCP/IP connection on the local machine with
       
   297 PostgreSQL, specify ``localhost`` here.
       
   298 
       
   299 .. setting:: NAME
       
   300 
       
   301 NAME
       
   302 ~~~~
       
   303 
       
   304 Default: ``''`` (Empty string)
       
   305 
       
   306 The name of the database to use. For SQLite, it's the full path to the database
       
   307 file. When specifying the path, always use forward slashes, even on Windows
       
   308 (e.g. ``C:/homes/user/mysite/sqlite3.db``).
       
   309 
       
   310 .. setting:: OPTIONS
       
   311 
       
   312 OPTIONS
       
   313 ~~~~~~~
       
   314 
       
   315 Default: ``{}`` (Empty dictionary)
       
   316 
       
   317 Extra parameters to use when connecting to the database. Available parameters
       
   318 vary depending on your database backend.
       
   319 
       
   320 Some information on available parameters can be found in the
       
   321 :doc:`Database Backends </ref/databases>` documentation. For more information,
       
   322 consult your backend module's own documentation.
       
   323 
       
   324 .. setting:: PASSWORD
       
   325 
       
   326 PASSWORD
       
   327 ~~~~~~~~
       
   328 
       
   329 Default: ``''`` (Empty string)
       
   330 
       
   331 The password to use when connecting to the database. Not used with SQLite.
       
   332 
       
   333 .. setting:: PORT
       
   334 
       
   335 PORT
       
   336 ~~~~
       
   337 
       
   338 Default: ``''`` (Empty string)
       
   339 
       
   340 The port to use when connecting to the database. An empty string means the
       
   341 default port. Not used with SQLite.
       
   342 
       
   343 .. setting:: USER
       
   344 
       
   345 USER
       
   346 ~~~~
       
   347 
       
   348 Default: ``''`` (Empty string)
       
   349 
       
   350 The username to use when connecting to the database. Not used with SQLite.
       
   351 
       
   352 .. setting:: TEST_CHARSET
       
   353 
       
   354 TEST_CHARSET
       
   355 ~~~~~~~~~~~~
       
   356 
       
   357 Default: ``None``
       
   358 
       
   359 The character set encoding used to create the test database. The value of this
       
   360 string is passed directly through to the database, so its format is
       
   361 backend-specific.
       
   362 
       
   363 Supported for the PostgreSQL_ (``postgresql``, ``postgresql_psycopg2``) and
       
   364 MySQL_ (``mysql``) backends.
       
   365 
       
   366 .. _PostgreSQL: http://www.postgresql.org/docs/8.2/static/multibyte.html
       
   367 .. _MySQL: http://dev.mysql.com/doc/refman/5.0/en/charset-database.html
       
   368 
       
   369 .. setting:: TEST_COLLATION
       
   370 
       
   371 TEST_COLLATION
       
   372 ~~~~~~~~~~~~~~
       
   373 
       
   374 Default: ``None``
       
   375 
       
   376 The collation order to use when creating the test database. This value is
       
   377 passed directly to the backend, so its format is backend-specific.
       
   378 
       
   379 Only supported for the ``mysql`` backend (see the `MySQL manual`_ for details).
       
   380 
       
   381 .. _MySQL manual: MySQL_
       
   382 
       
   383 .. setting:: TEST_DEPENDENCIES
       
   384 
       
   385 TEST_DEPENDENCIES
       
   386 ~~~~~~~~~~~~~~~~~
       
   387 
       
   388 .. versionadded:: 1.2.4
       
   389 
       
   390 Default: ``['default']``, for all databases other than ``default``,
       
   391 which has no dependencies.
       
   392 
       
   393 The creation-order dependencies of the database. See the documentation
       
   394 on :ref:`controlling the creation order of test databases
       
   395 <topics-testing-creation-dependencies>` for details.
       
   396 
       
   397 .. setting:: TEST_MIRROR
       
   398 
       
   399 TEST_MIRROR
       
   400 ~~~~~~~~~~~
       
   401 
       
   402 Default: ``None``
       
   403 
       
   404 The alias of the database that this database should mirror during
       
   405 testing.
       
   406 
       
   407 This setting exists to allow for testing of master/slave
       
   408 configurations of multiple databases. See the documentation on
       
   409 :ref:`testing master/slave configurations
       
   410 <topics-testing-masterslave>` for details.
       
   411 
       
   412 .. setting:: TEST_NAME
       
   413 
       
   414 TEST_NAME
       
   415 ~~~~~~~~~
       
   416 
       
   417 Default: ``None``
       
   418 
       
   419 The name of database to use when running the test suite.
       
   420 
       
   421 If the default value (``None``) is used with the SQLite database engine, the
       
   422 tests will use a memory resident database. For all other database engines the
       
   423 test database will use the name ``'test_' + DATABASE_NAME``.
       
   424 
       
   425 See :doc:`/topics/testing`.
       
   426 
       
   427 .. setting:: TEST_USER
       
   428 
       
   429 TEST_USER
       
   430 ~~~~~~~~~
       
   431 
       
   432 Default: ``None``
       
   433 
       
   434 This is an Oracle-specific setting.
       
   435 
       
   436 The username to use when connecting to the Oracle database that will be used
       
   437 when running tests.
       
   438 
       
   439 .. setting:: DATABASE_ROUTERS
       
   440 
       
   441 DATABASE_ROUTERS
       
   442 ----------------
       
   443 
       
   444 .. versionadded:: 1.2
       
   445 
       
   446 Default: ``[]`` (Empty list)
       
   447 
       
   448 The list of routers that will be used to determine which database
       
   449 to use when performing a database queries.
       
   450 
       
   451 See the documentation on :ref:`automatic database routing in multi
       
   452 database configurations <topics-db-multi-db-routing>`.
       
   453 
       
   454 .. setting:: DATE_FORMAT
       
   455 
       
   456 DATE_FORMAT
       
   457 -----------
       
   458 
       
   459 Default: ``'N j, Y'`` (e.g. ``Feb. 4, 2003``)
       
   460 
       
   461 The default formatting to use for displaying date fields in any part of the
       
   462 system. Note that if :setting:`USE_L10N` is set to ``True``, then the
       
   463 locale-dictated format has higher precedence and will be applied instead. See
       
   464 :tfilter:`allowed date format strings <date>`.
       
   465 
       
   466 .. versionchanged:: 1.2
       
   467     This setting can now be overriden by setting ``USE_L10N`` to ``True``.
       
   468 
       
   469 See also ``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``SHORT_DATE_FORMAT``.
       
   470 
       
   471 .. setting:: DATE_INPUT_FORMATS
       
   472 
       
   473 DATE_INPUT_FORMATS
       
   474 ------------------
       
   475 
       
   476 .. versionadded:: 1.2
       
   477 
       
   478 Default::
       
   479 
       
   480     ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y',
       
   481     '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y',
       
   482     '%B %d, %Y', '%d %B %Y', '%d %B, %Y')
       
   483 
       
   484 A tuple of formats that will be accepted when inputting data on a date
       
   485 field. Formats will be tried in order, using the first valid.
       
   486 Note that these format strings are specified in Python's datetime_ module
       
   487 syntax, that is different from the one used by Django for formatting dates
       
   488 to be displayed.
       
   489 
       
   490 See also ``DATETIME_INPUT_FORMATS`` and ``TIME_INPUT_FORMATS``.
       
   491 
       
   492 .. _datetime: http://docs.python.org/library/datetime.html#strftime-strptime-behavior
       
   493 
       
   494 .. setting:: DATETIME_FORMAT
       
   495 
       
   496 DATETIME_FORMAT
       
   497 ---------------
       
   498 
       
   499 Default: ``'N j, Y, P'`` (e.g. ``Feb. 4, 2003, 4 p.m.``)
       
   500 
       
   501 The default formatting to use for displaying datetime fields in any part of the
       
   502 system. Note that if :setting:`USE_L10N` is set to ``True``, then the
       
   503 locale-dictated format has higher precedence and will be applied instead. See
       
   504 :tfilter:`allowed date format strings <date>`.
       
   505 
       
   506 .. versionchanged:: 1.2
       
   507     This setting can now be overriden by setting ``USE_L10N`` to ``True``.
       
   508 
       
   509 See also ``DATE_FORMAT``, ``TIME_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
       
   510 
       
   511 .. setting:: DATETIME_INPUT_FORMATS
       
   512 
       
   513 DATETIME_INPUT_FORMATS
       
   514 ----------------------
       
   515 
       
   516 .. versionadded:: 1.2
       
   517 
       
   518 Default::
       
   519 
       
   520     ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d',
       
   521     '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y',
       
   522     '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y')
       
   523 
       
   524 A tuple of formats that will be accepted when inputting data on a datetime
       
   525 field. Formats will be tried in order, using the first valid.
       
   526 Note that these format strings are specified in Python's datetime_ module
       
   527 syntax, that is different from the one used by Django for formatting dates
       
   528 to be displayed.
       
   529 
       
   530 See also ``DATE_INPUT_FORMATS`` and ``TIME_INPUT_FORMATS``.
       
   531 
       
   532 .. _datetime: http://docs.python.org/library/datetime.html#strftime-strptime-behavior
       
   533 
       
   534 .. setting:: DEBUG
       
   535 
       
   536 DEBUG
       
   537 -----
       
   538 
       
   539 Default: ``False``
       
   540 
       
   541 A boolean that turns on/off debug mode.
       
   542 
       
   543 If you define custom settings, `django/views/debug.py`_ has a ``HIDDEN_SETTINGS``
       
   544 regular expression which will hide from the DEBUG view anything that contains
       
   545 ``'SECRET'``, ``'PASSWORD'``, ``'PROFANITIES'``, or ``'SIGNATURE'``. This allows
       
   546 untrusted users to be able to give backtraces without seeing sensitive (or
       
   547 offensive) settings.
       
   548 
       
   549 Still, note that there are always going to be sections of your debug output that
       
   550 are inappropriate for public consumption. File paths, configuration options, and
       
   551 the like all give attackers extra information about your server.
       
   552 
       
   553 It is also important to remember that when running with ``DEBUG`` turned on, Django
       
   554 will remember every SQL query it executes. This is useful when you are debugging,
       
   555 but on a production server, it will rapidly consume memory.
       
   556 
       
   557 Never deploy a site into production with ``DEBUG`` turned on.
       
   558 
       
   559 .. _django/views/debug.py: http://code.djangoproject.com/browser/django/trunk/django/views/debug.py
       
   560 
       
   561 DEBUG_PROPAGATE_EXCEPTIONS
       
   562 --------------------------
       
   563 
       
   564 .. versionadded:: 1.0
       
   565 
       
   566 Default: ``False``
       
   567 
       
   568 If set to True, Django's normal exception handling of view functions
       
   569 will be suppressed, and exceptions will propagate upwards.  This can
       
   570 be useful for some test setups, and should never be used on a live
       
   571 site.
       
   572 
       
   573 .. setting:: DECIMAL_SEPARATOR
       
   574 
       
   575 DECIMAL_SEPARATOR
       
   576 -----------------
       
   577 
       
   578 .. versionadded:: 1.2
       
   579 
       
   580 Default: ``'.'`` (Dot)
       
   581 
       
   582 Default decimal separator used when formatting decimal numbers.
       
   583 
       
   584 .. setting:: DEFAULT_CHARSET
       
   585 
       
   586 DEFAULT_CHARSET
       
   587 ---------------
       
   588 
       
   589 Default: ``'utf-8'``
       
   590 
       
   591 Default charset to use for all ``HttpResponse`` objects, if a MIME type isn't
       
   592 manually specified. Used with ``DEFAULT_CONTENT_TYPE`` to construct the
       
   593 ``Content-Type`` header.
       
   594 
       
   595 .. setting:: DEFAULT_CONTENT_TYPE
       
   596 
       
   597 DEFAULT_CONTENT_TYPE
       
   598 --------------------
       
   599 
       
   600 Default: ``'text/html'``
       
   601 
       
   602 Default content type to use for all ``HttpResponse`` objects, if a MIME type
       
   603 isn't manually specified. Used with ``DEFAULT_CHARSET`` to construct the
       
   604 ``Content-Type`` header.
       
   605 
       
   606 .. setting:: DEFAULT_FILE_STORAGE
       
   607 
       
   608 DEFAULT_FILE_STORAGE
       
   609 --------------------
       
   610 
       
   611 Default: :class:`django.core.files.storage.FileSystemStorage`
       
   612 
       
   613 Default file storage class to be used for any file-related operations that don't
       
   614 specify a particular storage system. See :doc:`/topics/files`.
       
   615 
       
   616 .. setting:: DEFAULT_FROM_EMAIL
       
   617 
       
   618 DEFAULT_FROM_EMAIL
       
   619 ------------------
       
   620 
       
   621 Default: ``'webmaster@localhost'``
       
   622 
       
   623 Default e-mail address to use for various automated correspondence from the
       
   624 site manager(s).
       
   625 
       
   626 .. setting:: DEFAULT_INDEX_TABLESPACE
       
   627 
       
   628 DEFAULT_INDEX_TABLESPACE
       
   629 ------------------------
       
   630 
       
   631 .. versionadded:: 1.0
       
   632 
       
   633 Default: ``''`` (Empty string)
       
   634 
       
   635 Default tablespace to use for indexes on fields that don't specify
       
   636 one, if the backend supports it.
       
   637 
       
   638 .. setting:: DEFAULT_TABLESPACE
       
   639 
       
   640 DEFAULT_TABLESPACE
       
   641 ------------------
       
   642 
       
   643 .. versionadded:: 1.0
       
   644 
       
   645 Default: ``''`` (Empty string)
       
   646 
       
   647 Default tablespace to use for models that don't specify one, if the
       
   648 backend supports it.
       
   649 
       
   650 .. setting:: DISALLOWED_USER_AGENTS
       
   651 
       
   652 DISALLOWED_USER_AGENTS
       
   653 ----------------------
       
   654 
       
   655 Default: ``()`` (Empty tuple)
       
   656 
       
   657 List of compiled regular expression objects representing User-Agent strings that
       
   658 are not allowed to visit any page, systemwide. Use this for bad robots/crawlers.
       
   659 This is only used if ``CommonMiddleware`` is installed (see
       
   660 :doc:`/topics/http/middleware`).
       
   661 
       
   662 .. setting:: EMAIL_BACKEND
       
   663 
       
   664 EMAIL_BACKEND
       
   665 -------------
       
   666 
       
   667 .. versionadded:: 1.2
       
   668 
       
   669 Default: ``'django.core.mail.backends.smtp.EmailBackend'``
       
   670 
       
   671 The backend to use for sending emails. For the list of available backends see
       
   672 :doc:`/topics/email`.
       
   673 
       
   674 .. setting:: EMAIL_FILE_PATH
       
   675 
       
   676 EMAIL_FILE_PATH
       
   677 ---------------
       
   678 
       
   679 .. versionadded:: 1.2
       
   680 
       
   681 Default: Not defined
       
   682 
       
   683 The directory used by the ``file`` email backend to store output files.
       
   684 
       
   685 .. setting:: EMAIL_HOST
       
   686 
       
   687 EMAIL_HOST
       
   688 ----------
       
   689 
       
   690 Default: ``'localhost'``
       
   691 
       
   692 The host to use for sending e-mail.
       
   693 
       
   694 See also ``EMAIL_PORT``.
       
   695 
       
   696 .. setting:: EMAIL_HOST_PASSWORD
       
   697 
       
   698 EMAIL_HOST_PASSWORD
       
   699 -------------------
       
   700 
       
   701 Default: ``''`` (Empty string)
       
   702 
       
   703 Password to use for the SMTP server defined in ``EMAIL_HOST``. This setting is
       
   704 used in conjunction with ``EMAIL_HOST_USER`` when authenticating to the SMTP
       
   705 server. If either of these settings is empty, Django won't attempt
       
   706 authentication.
       
   707 
       
   708 See also ``EMAIL_HOST_USER``.
       
   709 
       
   710 .. setting:: EMAIL_HOST_USER
       
   711 
       
   712 EMAIL_HOST_USER
       
   713 ---------------
       
   714 
       
   715 Default: ``''`` (Empty string)
       
   716 
       
   717 Username to use for the SMTP server defined in ``EMAIL_HOST``. If empty,
       
   718 Django won't attempt authentication.
       
   719 
       
   720 See also ``EMAIL_HOST_PASSWORD``.
       
   721 
       
   722 .. setting:: EMAIL_PORT
       
   723 
       
   724 EMAIL_PORT
       
   725 ----------
       
   726 
       
   727 Default: ``25``
       
   728 
       
   729 Port to use for the SMTP server defined in ``EMAIL_HOST``.
       
   730 
       
   731 .. setting:: EMAIL_SUBJECT_PREFIX
       
   732 
       
   733 EMAIL_SUBJECT_PREFIX
       
   734 --------------------
       
   735 
       
   736 Default: ``'[Django] '``
       
   737 
       
   738 Subject-line prefix for e-mail messages sent with ``django.core.mail.mail_admins``
       
   739 or ``django.core.mail.mail_managers``. You'll probably want to include the
       
   740 trailing space.
       
   741 
       
   742 .. setting:: EMAIL_USE_TLS
       
   743 
       
   744 EMAIL_USE_TLS
       
   745 -------------
       
   746 
       
   747 .. versionadded:: 1.0
       
   748 
       
   749 Default: ``False``
       
   750 
       
   751 Whether to use a TLS (secure) connection when talking to the SMTP server.
       
   752 
       
   753 .. setting:: FILE_CHARSET
       
   754 
       
   755 FILE_CHARSET
       
   756 ------------
       
   757 
       
   758 .. versionadded:: 1.0
       
   759 
       
   760 Default: ``'utf-8'``
       
   761 
       
   762 The character encoding used to decode any files read from disk. This includes
       
   763 template files and initial SQL data files.
       
   764 
       
   765 .. setting:: FILE_UPLOAD_HANDLERS
       
   766 
       
   767 FILE_UPLOAD_HANDLERS
       
   768 --------------------
       
   769 
       
   770 .. versionadded:: 1.0
       
   771 
       
   772 Default::
       
   773 
       
   774     ("django.core.files.uploadhandler.MemoryFileUploadHandler",
       
   775      "django.core.files.uploadhandler.TemporaryFileUploadHandler",)
       
   776 
       
   777 A tuple of handlers to use for uploading. See :doc:`/topics/files` for details.
       
   778 
       
   779 .. setting:: FILE_UPLOAD_MAX_MEMORY_SIZE
       
   780 
       
   781 FILE_UPLOAD_MAX_MEMORY_SIZE
       
   782 ---------------------------
       
   783 
       
   784 .. versionadded:: 1.0
       
   785 
       
   786 Default: ``2621440`` (i.e. 2.5 MB).
       
   787 
       
   788 The maximum size (in bytes) that an upload will be before it gets streamed to
       
   789 the file system. See :doc:`/topics/files` for details.
       
   790 
       
   791 .. setting:: FILE_UPLOAD_PERMISSIONS
       
   792 
       
   793 FILE_UPLOAD_PERMISSIONS
       
   794 -----------------------
       
   795 
       
   796 Default: ``None``
       
   797 
       
   798 The numeric mode (i.e. ``0644``) to set newly uploaded files to. For
       
   799 more information about what these modes mean, see the `documentation for
       
   800 os.chmod`_
       
   801 
       
   802 If this isn't given or is ``None``, you'll get operating-system
       
   803 dependent behavior. On most platforms, temporary files will have a mode
       
   804 of ``0600``, and files saved from memory will be saved using the
       
   805 system's standard umask.
       
   806 
       
   807 .. warning::
       
   808 
       
   809     **Always prefix the mode with a 0.**
       
   810 
       
   811     If you're not familiar with file modes, please note that the leading
       
   812     ``0`` is very important: it indicates an octal number, which is the
       
   813     way that modes must be specified. If you try to use ``644``, you'll
       
   814     get totally incorrect behavior.
       
   815 
       
   816 
       
   817 .. _documentation for os.chmod: http://docs.python.org/library/os.html#os.chmod
       
   818 
       
   819 .. setting:: FILE_UPLOAD_TEMP_DIR
       
   820 
       
   821 FILE_UPLOAD_TEMP_DIR
       
   822 --------------------
       
   823 
       
   824 .. versionadded:: 1.0
       
   825 
       
   826 Default: ``None``
       
   827 
       
   828 The directory to store data temporarily while uploading files. If ``None``,
       
   829 Django will use the standard temporary directory for the operating system. For
       
   830 example, this will default to '/tmp' on \*nix-style operating systems.
       
   831 
       
   832 See :doc:`/topics/files` for details.
       
   833 
       
   834 .. setting:: FIRST_DAY_OF_WEEK
       
   835 
       
   836 FIRST_DAY_OF_WEEK
       
   837 -----------------
       
   838 
       
   839 .. versionadded:: 1.2
       
   840 
       
   841 Default: ``0`` (Sunday)
       
   842 
       
   843 Number representing the first day of the week. This is especially useful
       
   844 when displaying a calendar. This value is only used when not using
       
   845 format internationalization, or when a format cannot be found for the
       
   846 current locale.
       
   847 
       
   848 The value must be an integer from 0 to 6, where 0 means Sunday, 1 means
       
   849 Monday and so on.
       
   850 
       
   851 .. setting:: FIXTURE_DIRS
       
   852 
       
   853 FIXTURE_DIRS
       
   854 -------------
       
   855 
       
   856 Default: ``()`` (Empty tuple)
       
   857 
       
   858 List of locations of the fixture data files, in search order. Note that
       
   859 these paths should use Unix-style forward slashes, even on Windows. See
       
   860 :doc:`/topics/testing`.
       
   861 
       
   862 FORCE_SCRIPT_NAME
       
   863 ------------------
       
   864 
       
   865 Default: ``None``
       
   866 
       
   867 If not ``None``, this will be used as the value of the ``SCRIPT_NAME``
       
   868 environment variable in any HTTP request. This setting can be used to override
       
   869 the server-provided value of ``SCRIPT_NAME``, which may be a rewritten version
       
   870 of the preferred value or not supplied at all.
       
   871 
       
   872 .. setting:: FORMAT_MODULE_PATH
       
   873 
       
   874 FORMAT_MODULE_PATH
       
   875 ------------------
       
   876 
       
   877 .. versionadded:: 1.2
       
   878 
       
   879 Default: ``None``
       
   880 
       
   881 A full Python path to a Python package that contains format definitions for
       
   882 project locales. If not ``None``, Django will check for a ``formats.py``
       
   883 file, under the directory named as the current locale, and will use the
       
   884 formats defined on this file.
       
   885 
       
   886 For example, if ``FORMAT_MODULE_PATH`` is set to ``mysite.formats``, and
       
   887 current language is ``en`` (English), Django will expect a directory tree
       
   888 like::
       
   889 
       
   890     mysite/
       
   891         formats/
       
   892             __init__.py
       
   893             en/
       
   894                 __init__.py
       
   895                 formats.py
       
   896 
       
   897 Available formats are ``DATE_FORMAT``, ``TIME_FORMAT``, ``DATETIME_FORMAT``,
       
   898 ``YEAR_MONTH_FORMAT``, ``MONTH_DAY_FORMAT``, ``SHORT_DATE_FORMAT``,
       
   899 ``SHORT_DATETIME_FORMAT``, ``FIRST_DAY_OF_WEEK``, ``DECIMAL_SEPARATOR``,
       
   900 ``THOUSAND_SEPARATOR`` and ``NUMBER_GROUPING``.
       
   901 
       
   902 .. setting:: IGNORABLE_404_ENDS
       
   903 
       
   904 IGNORABLE_404_ENDS
       
   905 ------------------
       
   906 
       
   907 Default: ``('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')``
       
   908 
       
   909 See also ``IGNORABLE_404_STARTS`` and ``Error reporting via e-mail``.
       
   910 
       
   911 .. setting:: IGNORABLE_404_STARTS
       
   912 
       
   913 IGNORABLE_404_STARTS
       
   914 --------------------
       
   915 
       
   916 Default: ``('/cgi-bin/', '/_vti_bin', '/_vti_inf')``
       
   917 
       
   918 A tuple of strings that specify beginnings of URLs that should be ignored by
       
   919 the 404 e-mailer. See ``SEND_BROKEN_LINK_EMAILS``, ``IGNORABLE_404_ENDS`` and
       
   920 the :doc:`/howto/error-reporting`.
       
   921 
       
   922 .. setting:: INSTALLED_APPS
       
   923 
       
   924 INSTALLED_APPS
       
   925 --------------
       
   926 
       
   927 Default: ``()`` (Empty tuple)
       
   928 
       
   929 A tuple of strings designating all applications that are enabled in this Django
       
   930 installation. Each string should be a full Python path to a Python package that
       
   931 contains a Django application, as created by :djadmin:`django-admin.py startapp
       
   932 <startapp>`.
       
   933 
       
   934 .. admonition:: App names must be unique
       
   935 
       
   936     The application names (that is, the final dotted part of the
       
   937     path to the module containing ``models.py``) defined in
       
   938     :setting:`INSTALLED_APPS` *must* be unique. For example, you can't
       
   939     include both ``django.contrib.auth`` and ``myproject.auth`` in
       
   940     INSTALLED_APPS.
       
   941 
       
   942 .. setting:: INTERNAL_IPS
       
   943 
       
   944 INTERNAL_IPS
       
   945 ------------
       
   946 
       
   947 Default: ``()`` (Empty tuple)
       
   948 
       
   949 A tuple of IP addresses, as strings, that:
       
   950 
       
   951     * See debug comments, when ``DEBUG`` is ``True``
       
   952     * Receive X headers if the ``XViewMiddleware`` is installed (see
       
   953       :doc:`/topics/http/middleware`)
       
   954 
       
   955 .. setting:: LANGUAGE_CODE
       
   956 
       
   957 LANGUAGE_CODE
       
   958 -------------
       
   959 
       
   960 Default: ``'en-us'``
       
   961 
       
   962 A string representing the language code for this installation. This should be in
       
   963 standard :term:`language format<language code>`. For example, U.S. English is
       
   964 ``"en-us"``. See :doc:`/topics/i18n/index`.
       
   965 
       
   966 .. setting:: LANGUAGE_COOKIE_NAME
       
   967 
       
   968 LANGUAGE_COOKIE_NAME
       
   969 --------------------
       
   970 
       
   971 .. versionadded:: 1.0
       
   972 
       
   973 Default: ``'django_language'``
       
   974 
       
   975 The name of the cookie to use for the language cookie. This can be whatever you
       
   976 want (but should be different from ``SESSION_COOKIE_NAME``). See
       
   977 :doc:`/topics/i18n/index`.
       
   978 
       
   979 .. setting:: LANGUAGES
       
   980 
       
   981 LANGUAGES
       
   982 ---------
       
   983 
       
   984 Default: A tuple of all available languages. This list is continually growing
       
   985 and including a copy here would inevitably become rapidly out of date. You can
       
   986 see the current list of translated languages by looking in
       
   987 ``django/conf/global_settings.py`` (or view the `online source`_).
       
   988 
       
   989 .. _online source: http://code.djangoproject.com/browser/django/trunk/django/conf/global_settings.py
       
   990 
       
   991 The list is a tuple of two-tuples in the format ``(language code, language
       
   992 name)``, the ``language code`` part should be a
       
   993 :term:`language name<language code>` -- for example, ``('ja', 'Japanese')``.
       
   994 This specifies which languages are available for language selection. See
       
   995 :doc:`/topics/i18n/index`.
       
   996 
       
   997 Generally, the default value should suffice. Only set this setting if you want
       
   998 to restrict language selection to a subset of the Django-provided languages.
       
   999 
       
  1000 If you define a custom ``LANGUAGES`` setting, it's OK to mark the languages as
       
  1001 translation strings (as in the default value referred to above) -- but use a
       
  1002 "dummy" ``gettext()`` function, not the one in ``django.utils.translation``.
       
  1003 You should *never* import ``django.utils.translation`` from within your
       
  1004 settings file, because that module in itself depends on the settings, and that
       
  1005 would cause a circular import.
       
  1006 
       
  1007 The solution is to use a "dummy" ``gettext()`` function. Here's a sample
       
  1008 settings file::
       
  1009 
       
  1010     gettext = lambda s: s
       
  1011 
       
  1012     LANGUAGES = (
       
  1013         ('de', gettext('German')),
       
  1014         ('en', gettext('English')),
       
  1015     )
       
  1016 
       
  1017 With this arrangement, ``django-admin.py makemessages`` will still find and
       
  1018 mark these strings for translation, but the translation won't happen at
       
  1019 runtime -- so you'll have to remember to wrap the languages in the *real*
       
  1020 ``gettext()`` in any code that uses ``LANGUAGES`` at runtime.
       
  1021 
       
  1022 .. setting:: LOCALE_PATHS
       
  1023 
       
  1024 LOCALE_PATHS
       
  1025 ------------
       
  1026 
       
  1027 Default: ``()`` (Empty tuple)
       
  1028 
       
  1029 A tuple of directories where Django looks for translation files.
       
  1030 See :ref:`using-translations-in-your-own-projects`.
       
  1031 
       
  1032 .. setting:: LOGIN_REDIRECT_URL
       
  1033 
       
  1034 LOGIN_REDIRECT_URL
       
  1035 ------------------
       
  1036 
       
  1037 .. versionadded:: 1.0
       
  1038 
       
  1039 Default: ``'/accounts/profile/'``
       
  1040 
       
  1041 The URL where requests are redirected after login when the
       
  1042 ``contrib.auth.login`` view gets no ``next`` parameter.
       
  1043 
       
  1044 This is used by the :func:`~django.contrib.auth.decorators.login_required`
       
  1045 decorator, for example.
       
  1046 
       
  1047 .. setting:: LOGIN_URL
       
  1048 
       
  1049 LOGIN_URL
       
  1050 ---------
       
  1051 
       
  1052 .. versionadded:: 1.0
       
  1053 
       
  1054 Default: ``'/accounts/login/'``
       
  1055 
       
  1056 The URL where requests are redirected for login, especially when using the
       
  1057 :func:`~django.contrib.auth.decorators.login_required` decorator.
       
  1058 
       
  1059 .. setting:: LOGOUT_URL
       
  1060 
       
  1061 LOGOUT_URL
       
  1062 ----------
       
  1063 
       
  1064 .. versionadded:: 1.0
       
  1065 
       
  1066 Default: ``'/accounts/logout/'``
       
  1067 
       
  1068 LOGIN_URL counterpart.
       
  1069 
       
  1070 .. setting:: MANAGERS
       
  1071 
       
  1072 MANAGERS
       
  1073 --------
       
  1074 
       
  1075 Default: ``()`` (Empty tuple)
       
  1076 
       
  1077 A tuple in the same format as ``ADMINS`` that specifies who should get
       
  1078 broken-link notifications when ``SEND_BROKEN_LINK_EMAILS=True``.
       
  1079 
       
  1080 .. setting:: MEDIA_ROOT
       
  1081 
       
  1082 MEDIA_ROOT
       
  1083 ----------
       
  1084 
       
  1085 Default: ``''`` (Empty string)
       
  1086 
       
  1087 Absolute path to the directory that holds media for this installation.
       
  1088 Example: ``"/home/media/media.lawrence.com/"`` See also ``MEDIA_URL``.
       
  1089 
       
  1090 .. setting:: MEDIA_URL
       
  1091 
       
  1092 MEDIA_URL
       
  1093 ---------
       
  1094 
       
  1095 Default: ``''`` (Empty string)
       
  1096 
       
  1097 URL that handles the media served from ``MEDIA_ROOT``.
       
  1098 Example: ``"http://media.lawrence.com"``
       
  1099 
       
  1100 Note that this should have a trailing slash if it has a path component.
       
  1101 
       
  1102 Good: ``"http://www.example.com/static/"``
       
  1103 Bad: ``"http://www.example.com/static"``
       
  1104 
       
  1105 .. setting:: MIDDLEWARE_CLASSES
       
  1106 
       
  1107 MESSAGE_LEVEL
       
  1108 -------------
       
  1109 
       
  1110 .. versionadded:: 1.2
       
  1111 
       
  1112 Default: `messages.INFO`
       
  1113 
       
  1114 Sets the minimum message level that will be recorded by the messages
       
  1115 framework. See the :doc:`messages documentation </ref/contrib/messages>` for
       
  1116 more details.
       
  1117 
       
  1118 MESSAGE_STORAGE
       
  1119 ---------------
       
  1120 
       
  1121 .. versionadded:: 1.2
       
  1122 
       
  1123 Default: ``'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'``
       
  1124 
       
  1125 Controls where Django stores message data.  See the
       
  1126 :doc:`messages documentation </ref/contrib/messages>` for more details.
       
  1127 
       
  1128 MESSAGE_TAGS
       
  1129 ------------
       
  1130 
       
  1131 .. versionadded:: 1.2
       
  1132 
       
  1133 Default::
       
  1134 
       
  1135         {messages.DEBUG: 'debug',
       
  1136         messages.INFO: 'info',
       
  1137         messages.SUCCESS: 'success',
       
  1138         messages.WARNING: 'warning',
       
  1139         messages.ERROR: 'error',}
       
  1140 
       
  1141 Sets the mapping of message levels to message tags. See the
       
  1142 :doc:`messages documentation </ref/contrib/messages>` for more details.
       
  1143 
       
  1144 MIDDLEWARE_CLASSES
       
  1145 ------------------
       
  1146 
       
  1147 Default::
       
  1148 
       
  1149     ('django.middleware.common.CommonMiddleware',
       
  1150      'django.contrib.sessions.middleware.SessionMiddleware',
       
  1151      'django.middleware.csrf.CsrfViewMiddleware',
       
  1152      'django.contrib.auth.middleware.AuthenticationMiddleware',
       
  1153      'django.contrib.messages.middleware.MessageMiddleware',)
       
  1154 
       
  1155 A tuple of middleware classes to use. See :doc:`/topics/http/middleware`.
       
  1156 
       
  1157 .. versionchanged:: 1.2
       
  1158    ``'django.contrib.messages.middleware.MessageMiddleware'`` was added to the
       
  1159    default.  For more information, see the :doc:`messages documentation
       
  1160    </ref/contrib/messages>`.
       
  1161 
       
  1162 .. setting:: MONTH_DAY_FORMAT
       
  1163 
       
  1164 MONTH_DAY_FORMAT
       
  1165 ----------------
       
  1166 
       
  1167 Default: ``'F j'``
       
  1168 
       
  1169 The default formatting to use for date fields on Django admin change-list
       
  1170 pages -- and, possibly, by other parts of the system -- in cases when only the
       
  1171 month and day are displayed.
       
  1172 
       
  1173 For example, when a Django admin change-list page is being filtered by a date
       
  1174 drilldown, the header for a given day displays the day and month. Different
       
  1175 locales have different formats. For example, U.S. English would say
       
  1176 "January 1," whereas Spanish might say "1 Enero."
       
  1177 
       
  1178 See :tfilter:`allowed date format strings <date>`. See also ``DATE_FORMAT``,
       
  1179 ``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``YEAR_MONTH_FORMAT``.
       
  1180 
       
  1181 .. setting:: NUMBER_GROUPING
       
  1182 
       
  1183 NUMBER_GROUPING
       
  1184 ----------------
       
  1185 
       
  1186 .. versionadded:: 1.2
       
  1187 
       
  1188 Default: ``0``
       
  1189 
       
  1190 Number of digits grouped together on the integer part of a number. Common use
       
  1191 is to display a thousand separator. If this setting is ``0``, then, no grouping
       
  1192 will be applied to the number. If this setting is greater than ``0`` then the
       
  1193 setting :setting:`THOUSAND_SEPARATOR` will be used as the separator between those
       
  1194 groups.
       
  1195 
       
  1196 See also :setting:`THOUSAND_SEPARATOR` and :setting:`USE_THOUSAND_SEPARATOR`.
       
  1197 
       
  1198 .. setting:: PASSWORD_RESET_TIMEOUT_DAYS
       
  1199 
       
  1200 PASSWORD_RESET_TIMEOUT_DAYS
       
  1201 ---------------------------
       
  1202 
       
  1203 Default: ``3``
       
  1204 
       
  1205 The number of days a password reset link is valid for. Used by the
       
  1206 :mod:`django.contrib.auth` password reset mechanism.
       
  1207 
       
  1208 .. setting:: PREPEND_WWW
       
  1209 
       
  1210 PREPEND_WWW
       
  1211 -----------
       
  1212 
       
  1213 Default: ``False``
       
  1214 
       
  1215 Whether to prepend the "www." subdomain to URLs that don't have it. This is only
       
  1216 used if :class:`~django.middleware.common.CommonMiddleware` is installed
       
  1217 (see :doc:`/topics/http/middleware`). See also :setting:`APPEND_SLASH`.
       
  1218 
       
  1219 .. setting:: PROFANITIES_LIST
       
  1220 
       
  1221 PROFANITIES_LIST
       
  1222 ----------------
       
  1223 
       
  1224 A tuple of profanities, as strings, that will trigger a validation error when
       
  1225 the ``hasNoProfanities`` validator is called.
       
  1226 
       
  1227 We don't list the default values here, because that would be profane. To see
       
  1228 the default values, see the file `django/conf/global_settings.py`_.
       
  1229 
       
  1230 .. _django/conf/global_settings.py: http://code.djangoproject.com/browser/django/trunk/django/conf/global_settings.py
       
  1231 
       
  1232 .. setting:: RESTRUCTUREDTEXT_FILTER_SETTINGS
       
  1233 
       
  1234 RESTRUCTUREDTEXT_FILTER_SETTINGS
       
  1235 --------------------------------
       
  1236 
       
  1237 Default: ``{}``
       
  1238 
       
  1239 A dictionary containing settings for the ``restructuredtext`` markup filter from
       
  1240 the :doc:`django.contrib.markup application </ref/contrib/markup>`. They override
       
  1241 the default writer settings. See the Docutils restructuredtext `writer settings
       
  1242 docs`_ for details.
       
  1243 
       
  1244 .. _writer settings docs: http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer
       
  1245 
       
  1246 .. setting:: ROOT_URLCONF
       
  1247 
       
  1248 ROOT_URLCONF
       
  1249 ------------
       
  1250 
       
  1251 Default: Not defined
       
  1252 
       
  1253 A string representing the full Python import path to your root URLconf. For example:
       
  1254 ``"mydjangoapps.urls"``. Can be overridden on a per-request basis by
       
  1255 setting the attribute ``urlconf`` on the incoming ``HttpRequest``
       
  1256 object. See :ref:`how-django-processes-a-request` for details.
       
  1257 
       
  1258 .. setting:: SECRET_KEY
       
  1259 
       
  1260 SECRET_KEY
       
  1261 ----------
       
  1262 
       
  1263 Default: ``''`` (Empty string)
       
  1264 
       
  1265 A secret key for this particular Django installation. Used to provide a seed in
       
  1266 secret-key hashing algorithms. Set this to a random string -- the longer, the
       
  1267 better. ``django-admin.py startproject`` creates one automatically.
       
  1268 
       
  1269 .. setting:: SEND_BROKEN_LINK_EMAILS
       
  1270 
       
  1271 SEND_BROKEN_LINK_EMAILS
       
  1272 -----------------------
       
  1273 
       
  1274 Default: ``False``
       
  1275 
       
  1276 Whether to send an e-mail to the ``MANAGERS`` each time somebody visits a
       
  1277 Django-powered page that is 404ed with a non-empty referer (i.e., a broken
       
  1278 link). This is only used if ``CommonMiddleware`` is installed (see
       
  1279 :doc:`/topics/http/middleware`. See also ``IGNORABLE_404_STARTS``,
       
  1280 ``IGNORABLE_404_ENDS`` and :doc:`/howto/error-reporting`.
       
  1281 
       
  1282 .. setting:: SERIALIZATION_MODULES
       
  1283 
       
  1284 SERIALIZATION_MODULES
       
  1285 ---------------------
       
  1286 
       
  1287 Default: Not defined.
       
  1288 
       
  1289 A dictionary of modules containing serializer definitions (provided as
       
  1290 strings), keyed by a string identifier for that serialization type. For
       
  1291 example, to define a YAML serializer, use::
       
  1292 
       
  1293     SERIALIZATION_MODULES = { 'yaml' : 'path.to.yaml_serializer' }
       
  1294 
       
  1295 .. setting:: SERVER_EMAIL
       
  1296 
       
  1297 SERVER_EMAIL
       
  1298 ------------
       
  1299 
       
  1300 Default: ``'root@localhost'``
       
  1301 
       
  1302 The e-mail address that error messages come from, such as those sent to
       
  1303 ``ADMINS`` and ``MANAGERS``.
       
  1304 
       
  1305 .. setting:: SESSION_COOKIE_AGE
       
  1306 
       
  1307 SESSION_COOKIE_AGE
       
  1308 ------------------
       
  1309 
       
  1310 Default: ``1209600`` (2 weeks, in seconds)
       
  1311 
       
  1312 The age of session cookies, in seconds. See :doc:`/topics/http/sessions`.
       
  1313 
       
  1314 .. setting:: SESSION_COOKIE_DOMAIN
       
  1315 
       
  1316 SESSION_COOKIE_DOMAIN
       
  1317 ---------------------
       
  1318 
       
  1319 Default: ``None``
       
  1320 
       
  1321 The domain to use for session cookies. Set this to a string such as
       
  1322 ``".lawrence.com"`` for cross-domain cookies, or use ``None`` for a standard
       
  1323 domain cookie. See the :doc:`/topics/http/sessions`.
       
  1324 
       
  1325 .. setting:: SESSION_COOKIE_NAME
       
  1326 
       
  1327 SESSION_COOKIE_NAME
       
  1328 -------------------
       
  1329 
       
  1330 Default: ``'sessionid'``
       
  1331 
       
  1332 The name of the cookie to use for sessions. This can be whatever you want (but
       
  1333 should be different from ``LANGUAGE_COOKIE_NAME``). See the :doc:`/topics/http/sessions`.
       
  1334 
       
  1335 .. setting:: SESSION_COOKIE_PATH
       
  1336 
       
  1337 SESSION_COOKIE_PATH
       
  1338 -------------------
       
  1339 
       
  1340 .. versionadded:: 1.0
       
  1341 
       
  1342 Default: ``'/'``
       
  1343 
       
  1344 The path set on the session cookie. This should either match the URL path of your
       
  1345 Django installation or be parent of that path.
       
  1346 
       
  1347 This is useful if you have multiple Django instances running under the same
       
  1348 hostname. They can use different cookie paths, and each instance will only see
       
  1349 its own session cookie.
       
  1350 
       
  1351 .. setting:: SESSION_COOKIE_SECURE
       
  1352 
       
  1353 SESSION_COOKIE_SECURE
       
  1354 ---------------------
       
  1355 
       
  1356 Default: ``False``
       
  1357 
       
  1358 Whether to use a secure cookie for the session cookie. If this is set to
       
  1359 ``True``, the cookie will be marked as "secure," which means browsers may
       
  1360 ensure that the cookie is only sent under an HTTPS connection.
       
  1361 See the :doc:`/topics/http/sessions`.
       
  1362 
       
  1363 .. setting:: SESSION_ENGINE
       
  1364 
       
  1365 SESSION_ENGINE
       
  1366 --------------
       
  1367 
       
  1368 .. versionadded:: 1.0
       
  1369 
       
  1370 .. versionchanged:: 1.1
       
  1371    The ``cached_db`` backend was added
       
  1372 
       
  1373 Default: ``django.contrib.sessions.backends.db``
       
  1374 
       
  1375 Controls where Django stores session data. Valid values are:
       
  1376 
       
  1377     * ``'django.contrib.sessions.backends.db'``
       
  1378     * ``'django.contrib.sessions.backends.file'``
       
  1379     * ``'django.contrib.sessions.backends.cache'``
       
  1380     * ``'django.contrib.sessions.backends.cached_db'``
       
  1381 
       
  1382 See :doc:`/topics/http/sessions`.
       
  1383 
       
  1384 .. setting:: SESSION_EXPIRE_AT_BROWSER_CLOSE
       
  1385 
       
  1386 SESSION_EXPIRE_AT_BROWSER_CLOSE
       
  1387 -------------------------------
       
  1388 
       
  1389 Default: ``False``
       
  1390 
       
  1391 Whether to expire the session when the user closes his or her browser.
       
  1392 See the :doc:`/topics/http/sessions`.
       
  1393 
       
  1394 .. setting:: SESSION_FILE_PATH
       
  1395 
       
  1396 SESSION_FILE_PATH
       
  1397 -----------------
       
  1398 
       
  1399 .. versionadded:: 1.0
       
  1400 
       
  1401 Default: ``None``
       
  1402 
       
  1403 If you're using file-based session storage, this sets the directory in
       
  1404 which Django will store session data. See :doc:`/topics/http/sessions`. When
       
  1405 the default value (``None``) is used, Django will use the standard temporary
       
  1406 directory for the system.
       
  1407 
       
  1408 .. setting:: SESSION_SAVE_EVERY_REQUEST
       
  1409 
       
  1410 SESSION_SAVE_EVERY_REQUEST
       
  1411 --------------------------
       
  1412 
       
  1413 Default: ``False``
       
  1414 
       
  1415 Whether to save the session data on every request. See
       
  1416 :doc:`/topics/http/sessions`.
       
  1417 
       
  1418 .. setting:: SHORT_DATE_FORMAT
       
  1419 
       
  1420 SHORT_DATE_FORMAT
       
  1421 -----------------
       
  1422 
       
  1423 .. versionadded:: 1.2
       
  1424 
       
  1425 Default: ``m/d/Y`` (e.g. ``12/31/2003``)
       
  1426 
       
  1427 An available formatting that can be used for displaying date fields on
       
  1428 templates. Note that if :setting:`USE_L10N` is set to ``True``, then the
       
  1429 corresponding locale-dictated format has higher precedence and will be applied.
       
  1430 See :tfilter:`allowed date format strings <date>`.
       
  1431 
       
  1432 See also ``DATE_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
       
  1433 
       
  1434 .. setting:: SHORT_DATETIME_FORMAT
       
  1435 
       
  1436 SHORT_DATETIME_FORMAT
       
  1437 ---------------------
       
  1438 
       
  1439 .. versionadded:: 1.2
       
  1440 
       
  1441 Default: ``m/d/Y P`` (e.g. ``12/31/2003 4 p.m.``)
       
  1442 
       
  1443 An available formatting that can be used for displaying datetime fields on
       
  1444 templates. Note that if :setting:`USE_L10N` is set to ``True``, then the
       
  1445 corresponding locale-dictated format has higher precedence and will be applied.
       
  1446 See :tfilter:`allowed date format strings <date>`.
       
  1447 
       
  1448 See also ``DATE_FORMAT`` and ``SHORT_DATETIME_FORMAT``.
       
  1449 
       
  1450 .. setting:: SITE_ID
       
  1451 
       
  1452 SITE_ID
       
  1453 -------
       
  1454 
       
  1455 Default: Not defined
       
  1456 
       
  1457 The ID, as an integer, of the current site in the ``django_site`` database
       
  1458 table. This is used so that application data can hook into specific site(s)
       
  1459 and a single database can manage content for multiple sites.
       
  1460 
       
  1461 See :doc:`/ref/contrib/sites`.
       
  1462 
       
  1463 .. _site framework docs: ../sites/
       
  1464 
       
  1465 .. setting:: TEMPLATE_CONTEXT_PROCESSORS
       
  1466 
       
  1467 TEMPLATE_CONTEXT_PROCESSORS
       
  1468 ---------------------------
       
  1469 
       
  1470 Default::
       
  1471 
       
  1472     ("django.contrib.auth.context_processors.auth",
       
  1473     "django.core.context_processors.debug",
       
  1474     "django.core.context_processors.i18n",
       
  1475     "django.core.context_processors.media",
       
  1476     "django.contrib.messages.context_processors.messages")
       
  1477 
       
  1478 A tuple of callables that are used to populate the context in ``RequestContext``.
       
  1479 These callables take a request object as their argument and return a dictionary
       
  1480 of items to be merged into the context.
       
  1481 
       
  1482 .. versionchanged:: 1.2
       
  1483    ``"django.contrib.messages.context_processors.messages"`` was added to the
       
  1484    default.  For more information, see the :doc:`messages documentation
       
  1485    </ref/contrib/messages>`.
       
  1486 
       
  1487 .. versionchanged:: 1.2
       
  1488     The auth context processor was moved in this release from its old location
       
  1489     ``django.core.context_processors.auth`` to
       
  1490     ``django.contrib.auth.context_processors.auth``.
       
  1491 
       
  1492 .. setting:: TEMPLATE_DEBUG
       
  1493 
       
  1494 TEMPLATE_DEBUG
       
  1495 --------------
       
  1496 
       
  1497 Default: ``False``
       
  1498 
       
  1499 A boolean that turns on/off template debug mode. If this is ``True``, the fancy
       
  1500 error page will display a detailed report for any ``TemplateSyntaxError``. This
       
  1501 report contains the relevant snippet of the template, with the appropriate line
       
  1502 highlighted.
       
  1503 
       
  1504 Note that Django only displays fancy error pages if ``DEBUG`` is ``True``, so
       
  1505 you'll want to set that to take advantage of this setting.
       
  1506 
       
  1507 See also ``DEBUG``.
       
  1508 
       
  1509 .. setting:: TEMPLATE_DIRS
       
  1510 
       
  1511 TEMPLATE_DIRS
       
  1512 -------------
       
  1513 
       
  1514 Default: ``()`` (Empty tuple)
       
  1515 
       
  1516 List of locations of the template source files, in search order. Note that
       
  1517 these paths should use Unix-style forward slashes, even on Windows.
       
  1518 
       
  1519 See :doc:`/topics/templates`.
       
  1520 
       
  1521 .. setting:: TEMPLATE_LOADERS
       
  1522 
       
  1523 TEMPLATE_LOADERS
       
  1524 ----------------
       
  1525 
       
  1526 Default::
       
  1527 
       
  1528      ('django.template.loaders.filesystem.Loader',
       
  1529       'django.template.loaders.app_directories.Loader')
       
  1530 
       
  1531 A tuple of template loader classes, specified as strings. Each ``Loader`` class
       
  1532 knows how to import templates from a particular source. Optionally, a tuple can be
       
  1533 used instead of a string. The first item in the tuple should be the ``Loader``'s
       
  1534 module, subsequent items are passed to the ``Loader`` during initialization. See
       
  1535 :doc:`/ref/templates/api`.
       
  1536 
       
  1537 .. setting:: TEMPLATE_STRING_IF_INVALID
       
  1538 
       
  1539 TEMPLATE_STRING_IF_INVALID
       
  1540 --------------------------
       
  1541 
       
  1542 Default: ``''`` (Empty string)
       
  1543 
       
  1544 Output, as a string, that the template system should use for invalid (e.g.
       
  1545 misspelled) variables. See :ref:`invalid-template-variables`..
       
  1546 
       
  1547 .. setting:: TEST_RUNNER
       
  1548 
       
  1549 TEST_RUNNER
       
  1550 -----------
       
  1551 
       
  1552 Default: ``'django.test.simple.DjangoTestSuiteRunner'``
       
  1553 
       
  1554 .. versionchanged:: 1.2
       
  1555    Prior to 1.2, test runners were a function, not a class.
       
  1556 
       
  1557 The name of the class to use for starting the test suite. See
       
  1558 :doc:`/topics/testing`.
       
  1559 
       
  1560 .. _Testing Django Applications: ../testing/
       
  1561 
       
  1562 .. setting:: THOUSAND_SEPARATOR
       
  1563 
       
  1564 THOUSAND_SEPARATOR
       
  1565 ------------------
       
  1566 
       
  1567 .. versionadded:: 1.2
       
  1568 
       
  1569 Default ``,`` (Comma)
       
  1570 
       
  1571 Default thousand separator used when formatting numbers. This setting is
       
  1572 used only when ``NUMBER_GROUPING`` and ``USE_THOUSAND_SEPARATOR`` are set.
       
  1573 
       
  1574 See also :setting:`NUMBER_GROUPING`, :setting:`DECIMAL_SEPARATOR` and
       
  1575 :setting:`USE_THOUSAND_SEPARATOR`.
       
  1576 
       
  1577 .. setting:: TIME_FORMAT
       
  1578 
       
  1579 TIME_FORMAT
       
  1580 -----------
       
  1581 
       
  1582 Default: ``'P'`` (e.g. ``4 p.m.``)
       
  1583 
       
  1584 The default formatting to use for displaying time fields in any part of the
       
  1585 system. Note that if :setting:`USE_L10N` is set to ``True``, then the
       
  1586 locale-dictated format has higher precedence and will be applied instead. See
       
  1587 :tfilter:`allowed date format strings <date>`.
       
  1588 
       
  1589 .. versionchanged:: 1.2
       
  1590     This setting can now be overriden by setting ``USE_L10N`` to ``True``.
       
  1591 
       
  1592 See also ``DATE_FORMAT`` and ``DATETIME_FORMAT``.
       
  1593 
       
  1594 .. setting:: TIME_INPUT_FORMATS
       
  1595 
       
  1596 TIME_INPUT_FORMATS
       
  1597 ------------------
       
  1598 
       
  1599 .. versionadded:: 1.2
       
  1600 
       
  1601 Default: ``('%H:%M:%S', '%H:%M')``
       
  1602 
       
  1603 A tuple of formats that will be accepted when inputting data on a time
       
  1604 field. Formats will be tried in order, using the first valid.
       
  1605 Note that these format strings are specified in Python's datetime_ module
       
  1606 syntax, that is different from the one used by Django for formatting dates
       
  1607 to be displayed.
       
  1608 
       
  1609 See also ``DATE_INPUT_FORMATS`` and ``DATETIME_INPUT_FORMATS``.
       
  1610 
       
  1611 .. _datetime: http://docs.python.org/library/datetime.html#strftime-strptime-behavior
       
  1612 
       
  1613 .. setting:: TIME_ZONE
       
  1614 
       
  1615 TIME_ZONE
       
  1616 ---------
       
  1617 
       
  1618 Default: ``'America/Chicago'``
       
  1619 
       
  1620 .. versionchanged:: 1.2
       
  1621    ``None`` was added as an allowed value.
       
  1622 
       
  1623 A string representing the time zone for this installation, or
       
  1624 ``None``. `See available choices`_. (Note that list of available
       
  1625 choices lists more than one on the same line; you'll want to use just
       
  1626 one of the choices for a given time zone. For instance, one line says
       
  1627 ``'Europe/London GB GB-Eire'``, but you should use the first bit of
       
  1628 that -- ``'Europe/London'`` -- as your ``TIME_ZONE`` setting.)
       
  1629 
       
  1630 Note that this is the time zone to which Django will convert all
       
  1631 dates/times -- not necessarily the timezone of the server. For
       
  1632 example, one server may serve multiple Django-powered sites, each with
       
  1633 a separate time-zone setting.
       
  1634 
       
  1635 Normally, Django sets the ``os.environ['TZ']`` variable to the time
       
  1636 zone you specify in the ``TIME_ZONE`` setting. Thus, all your views
       
  1637 and models will automatically operate in the correct time zone.
       
  1638 However, Django won't set the ``TZ`` environment variable under the
       
  1639 following conditions:
       
  1640 
       
  1641  * If you're using the manual configuration option as described in
       
  1642    :ref:`manually configuring settings
       
  1643    <settings-without-django-settings-module>`, or
       
  1644 
       
  1645  * If you specify ``TIME_ZONE = None``. This will cause Django to fall
       
  1646    back to using the system timezone.
       
  1647 
       
  1648 If Django doesn't set the ``TZ`` environment variable, it's up to you
       
  1649 to ensure your processes are running in the correct environment.
       
  1650 
       
  1651 .. note::
       
  1652     Django cannot reliably use alternate time zones in a Windows
       
  1653     environment. If you're running Django on Windows, this variable
       
  1654     must be set to match the system timezone.
       
  1655 
       
  1656 
       
  1657 .. _See available choices: http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
       
  1658 
       
  1659 .. setting:: URL_VALIDATOR_USER_AGENT
       
  1660 
       
  1661 URL_VALIDATOR_USER_AGENT
       
  1662 ------------------------
       
  1663 
       
  1664 Default: ``Django/<version> (http://www.djangoproject.com/)``
       
  1665 
       
  1666 The string to use as the ``User-Agent`` header when checking to see if URLs
       
  1667 exist (see the ``verify_exists`` option on :class:`~django.db.models.URLField`).
       
  1668 
       
  1669 .. setting:: USE_ETAGS
       
  1670 
       
  1671 USE_ETAGS
       
  1672 ---------
       
  1673 
       
  1674 Default: ``False``
       
  1675 
       
  1676 A boolean that specifies whether to output the "Etag" header. This saves
       
  1677 bandwidth but slows down performance. This is only used if ``CommonMiddleware``
       
  1678 is installed (see :doc:`/topics/http/middleware`).
       
  1679 
       
  1680 .. setting:: USE_I18N
       
  1681 
       
  1682 USE_I18N
       
  1683 --------
       
  1684 
       
  1685 Default: ``True``
       
  1686 
       
  1687 A boolean that specifies whether Django's internationalization system should be
       
  1688 enabled. This provides an easy way to turn it off, for performance. If this is
       
  1689 set to ``False``, Django will make some optimizations so as not to load the
       
  1690 internationalization machinery.
       
  1691 
       
  1692 See also ``USE_L10N``
       
  1693 
       
  1694 .. setting:: USE_L10N
       
  1695 
       
  1696 USE_L10N
       
  1697 --------
       
  1698 
       
  1699 .. versionadded:: 1.2
       
  1700 
       
  1701 Default ``False``
       
  1702 
       
  1703 A boolean that specifies if data will be localized by default or not. If this
       
  1704 is set to ``True``, e.g. Django will display numbers and dates using the
       
  1705 format of the current locale.
       
  1706 
       
  1707 See also ``USE_I18N`` and ``LANGUAGE_CODE``
       
  1708 
       
  1709 .. setting:: USE_THOUSAND_SEPARATOR
       
  1710 
       
  1711 USE_THOUSAND_SEPARATOR
       
  1712 ----------------------
       
  1713 
       
  1714 .. versionadded:: 1.2
       
  1715 
       
  1716 Default ``False``
       
  1717 
       
  1718 A boolean that specifies wheter to display numbers using a thousand separator.
       
  1719 If this is set to ``True``, Django will use values from ``THOUSAND_SEPARATOR``
       
  1720 and ``NUMBER_GROUPING`` from current locale, to format the number.
       
  1721 ``USE_L10N`` must be set to ``True``, in order to format numbers.
       
  1722 
       
  1723 See also ``THOUSAND_SEPARATOR`` and ``NUMBER_GROUPING``.
       
  1724 
       
  1725 .. setting:: YEAR_MONTH_FORMAT
       
  1726 
       
  1727 YEAR_MONTH_FORMAT
       
  1728 -----------------
       
  1729 
       
  1730 Default: ``'F Y'``
       
  1731 
       
  1732 The default formatting to use for date fields on Django admin change-list
       
  1733 pages -- and, possibly, by other parts of the system -- in cases when only the
       
  1734 year and month are displayed.
       
  1735 
       
  1736 For example, when a Django admin change-list page is being filtered by a date
       
  1737 drilldown, the header for a given month displays the month and the year.
       
  1738 Different locales have different formats. For example, U.S. English would say
       
  1739 "January 2006," whereas another locale might say "2006/January."
       
  1740 
       
  1741 See :tfilter:`allowed date format strings <date>`. See also ``DATE_FORMAT``,
       
  1742 ``DATETIME_FORMAT``, ``TIME_FORMAT`` and ``MONTH_DAY_FORMAT``.
       
  1743 
       
  1744 Deprecated settings
       
  1745 ===================
       
  1746 
       
  1747 .. setting:: DATABASE_ENGINE
       
  1748 
       
  1749 DATABASE_ENGINE
       
  1750 ---------------
       
  1751 
       
  1752 .. deprecated:: 1.2
       
  1753    This setting has been replaced by :setting:`ENGINE` in
       
  1754    :setting:`DATABASES`.
       
  1755 
       
  1756 .. setting:: DATABASE_HOST
       
  1757 
       
  1758 DATABASE_HOST
       
  1759 -------------
       
  1760 
       
  1761 .. deprecated:: 1.2
       
  1762    This setting has been replaced by :setting:`HOST` in
       
  1763    :setting:`DATABASES`.
       
  1764 
       
  1765 .. setting:: DATABASE_NAME
       
  1766 
       
  1767 DATABASE_NAME
       
  1768 -------------
       
  1769 
       
  1770 .. deprecated:: 1.2
       
  1771    This setting has been replaced by :setting:`NAME` in
       
  1772    :setting:`DATABASES`.
       
  1773 
       
  1774 .. setting:: DATABASE_OPTIONS
       
  1775 
       
  1776 DATABASE_OPTIONS
       
  1777 ----------------
       
  1778 
       
  1779 .. deprecated:: 1.2
       
  1780    This setting has been replaced by :setting:`OPTIONS` in
       
  1781    :setting:`DATABASES`.
       
  1782 
       
  1783 .. setting:: DATABASE_PASSWORD
       
  1784 
       
  1785 DATABASE_PASSWORD
       
  1786 -----------------
       
  1787 
       
  1788 .. deprecated:: 1.2
       
  1789    This setting has been replaced by :setting:`PASSWORD` in
       
  1790    :setting:`DATABASES`.
       
  1791 
       
  1792 .. setting:: DATABASE_PORT
       
  1793 
       
  1794 DATABASE_PORT
       
  1795 -------------
       
  1796 
       
  1797 .. deprecated:: 1.2
       
  1798    This setting has been replaced by :setting:`PORT` in
       
  1799    :setting:`DATABASES`.
       
  1800 
       
  1801 .. setting:: DATABASE_USER
       
  1802 
       
  1803 DATABASE_USER
       
  1804 -------------
       
  1805 
       
  1806 .. deprecated:: 1.2
       
  1807    This setting has been replaced by :setting:`USER` in
       
  1808    :setting:`DATABASES`.
       
  1809 
       
  1810 .. setting:: TEST_DATABASE_CHARSET
       
  1811 
       
  1812 TEST_DATABASE_CHARSET
       
  1813 ---------------------
       
  1814 
       
  1815 .. deprecated:: 1.2
       
  1816    This setting has been replaced by :setting:`TEST_CHARSET` in
       
  1817    :setting:`DATABASES`.
       
  1818 
       
  1819 .. setting:: TEST_DATABASE_COLLATION
       
  1820 
       
  1821 TEST_DATABASE_COLLATION
       
  1822 -----------------------
       
  1823 
       
  1824 .. deprecated:: 1.2
       
  1825    This setting has been replaced by :setting:`TEST_COLLATION` in
       
  1826    :setting:`DATABASES`.
       
  1827 
       
  1828 .. setting:: TEST_DATABASE_NAME
       
  1829 
       
  1830 TEST_DATABASE_NAME
       
  1831 ------------------
       
  1832 
       
  1833 .. deprecated:: 1.2
       
  1834    This setting has been replaced by :setting:`TEST_NAME` in
       
  1835    :setting:`DATABASES`.
       
  1836