settings.txt 77 KB

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