You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

global_settings.py 21KB

5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. """
  2. Default Django settings. Override these with settings in the module pointed to
  3. by the DJANGO_SETTINGS_MODULE environment variable.
  4. """
  5. # This is defined here as a do-nothing function because we can't import
  6. # django.utils.translation -- that module depends on the settings.
  7. def gettext_noop(s):
  8. return s
  9. ####################
  10. # CORE #
  11. ####################
  12. DEBUG = False
  13. # Whether the framework should propagate raw exceptions rather than catching
  14. # them. This is useful under some testing situations and should never be used
  15. # on a live site.
  16. DEBUG_PROPAGATE_EXCEPTIONS = False
  17. # People who get code error notifications.
  18. # In the format [('Full Name', 'email@example.com'), ('Full Name', 'anotheremail@example.com')]
  19. ADMINS = []
  20. # List of IP addresses, as strings, that:
  21. # * See debug comments, when DEBUG is true
  22. # * Receive x-headers
  23. INTERNAL_IPS = []
  24. # Hosts/domain names that are valid for this site.
  25. # "*" matches anything, ".example.com" matches example.com and all subdomains
  26. ALLOWED_HOSTS = []
  27. # Local time zone for this installation. All choices can be found here:
  28. # https://en.wikipedia.org/wiki/List_of_tz_zones_by_name (although not all
  29. # systems may support all possibilities). When USE_TZ is True, this is
  30. # interpreted as the default user time zone.
  31. TIME_ZONE = 'America/Chicago'
  32. # If you set this to True, Django will use timezone-aware datetimes.
  33. USE_TZ = False
  34. # Language code for this installation. All choices can be found here:
  35. # http://www.i18nguy.com/unicode/language-identifiers.html
  36. LANGUAGE_CODE = 'en-us'
  37. # Languages we provide translations for, out of the box.
  38. LANGUAGES = [
  39. ('af', gettext_noop('Afrikaans')),
  40. ('ar', gettext_noop('Arabic')),
  41. ('ast', gettext_noop('Asturian')),
  42. ('az', gettext_noop('Azerbaijani')),
  43. ('bg', gettext_noop('Bulgarian')),
  44. ('be', gettext_noop('Belarusian')),
  45. ('bn', gettext_noop('Bengali')),
  46. ('br', gettext_noop('Breton')),
  47. ('bs', gettext_noop('Bosnian')),
  48. ('ca', gettext_noop('Catalan')),
  49. ('cs', gettext_noop('Czech')),
  50. ('cy', gettext_noop('Welsh')),
  51. ('da', gettext_noop('Danish')),
  52. ('de', gettext_noop('German')),
  53. ('dsb', gettext_noop('Lower Sorbian')),
  54. ('el', gettext_noop('Greek')),
  55. ('en', gettext_noop('English')),
  56. ('en-au', gettext_noop('Australian English')),
  57. ('en-gb', gettext_noop('British English')),
  58. ('eo', gettext_noop('Esperanto')),
  59. ('es', gettext_noop('Spanish')),
  60. ('es-ar', gettext_noop('Argentinian Spanish')),
  61. ('es-co', gettext_noop('Colombian Spanish')),
  62. ('es-mx', gettext_noop('Mexican Spanish')),
  63. ('es-ni', gettext_noop('Nicaraguan Spanish')),
  64. ('es-ve', gettext_noop('Venezuelan Spanish')),
  65. ('et', gettext_noop('Estonian')),
  66. ('eu', gettext_noop('Basque')),
  67. ('fa', gettext_noop('Persian')),
  68. ('fi', gettext_noop('Finnish')),
  69. ('fr', gettext_noop('French')),
  70. ('fy', gettext_noop('Frisian')),
  71. ('ga', gettext_noop('Irish')),
  72. ('gd', gettext_noop('Scottish Gaelic')),
  73. ('gl', gettext_noop('Galician')),
  74. ('he', gettext_noop('Hebrew')),
  75. ('hi', gettext_noop('Hindi')),
  76. ('hr', gettext_noop('Croatian')),
  77. ('hsb', gettext_noop('Upper Sorbian')),
  78. ('hu', gettext_noop('Hungarian')),
  79. ('hy', gettext_noop('Armenian')),
  80. ('ia', gettext_noop('Interlingua')),
  81. ('id', gettext_noop('Indonesian')),
  82. ('io', gettext_noop('Ido')),
  83. ('is', gettext_noop('Icelandic')),
  84. ('it', gettext_noop('Italian')),
  85. ('ja', gettext_noop('Japanese')),
  86. ('ka', gettext_noop('Georgian')),
  87. ('kab', gettext_noop('Kabyle')),
  88. ('kk', gettext_noop('Kazakh')),
  89. ('km', gettext_noop('Khmer')),
  90. ('kn', gettext_noop('Kannada')),
  91. ('ko', gettext_noop('Korean')),
  92. ('lb', gettext_noop('Luxembourgish')),
  93. ('lt', gettext_noop('Lithuanian')),
  94. ('lv', gettext_noop('Latvian')),
  95. ('mk', gettext_noop('Macedonian')),
  96. ('ml', gettext_noop('Malayalam')),
  97. ('mn', gettext_noop('Mongolian')),
  98. ('mr', gettext_noop('Marathi')),
  99. ('my', gettext_noop('Burmese')),
  100. ('nb', gettext_noop('Norwegian Bokmål')),
  101. ('ne', gettext_noop('Nepali')),
  102. ('nl', gettext_noop('Dutch')),
  103. ('nn', gettext_noop('Norwegian Nynorsk')),
  104. ('os', gettext_noop('Ossetic')),
  105. ('pa', gettext_noop('Punjabi')),
  106. ('pl', gettext_noop('Polish')),
  107. ('pt', gettext_noop('Portuguese')),
  108. ('pt-br', gettext_noop('Brazilian Portuguese')),
  109. ('ro', gettext_noop('Romanian')),
  110. ('ru', gettext_noop('Russian')),
  111. ('sk', gettext_noop('Slovak')),
  112. ('sl', gettext_noop('Slovenian')),
  113. ('sq', gettext_noop('Albanian')),
  114. ('sr', gettext_noop('Serbian')),
  115. ('sr-latn', gettext_noop('Serbian Latin')),
  116. ('sv', gettext_noop('Swedish')),
  117. ('sw', gettext_noop('Swahili')),
  118. ('ta', gettext_noop('Tamil')),
  119. ('te', gettext_noop('Telugu')),
  120. ('th', gettext_noop('Thai')),
  121. ('tr', gettext_noop('Turkish')),
  122. ('tt', gettext_noop('Tatar')),
  123. ('udm', gettext_noop('Udmurt')),
  124. ('uk', gettext_noop('Ukrainian')),
  125. ('ur', gettext_noop('Urdu')),
  126. ('vi', gettext_noop('Vietnamese')),
  127. ('zh-hans', gettext_noop('Simplified Chinese')),
  128. ('zh-hant', gettext_noop('Traditional Chinese')),
  129. ]
  130. # Languages using BiDi (right-to-left) layout
  131. LANGUAGES_BIDI = ["he", "ar", "fa", "ur"]
  132. # If you set this to False, Django will make some optimizations so as not
  133. # to load the internationalization machinery.
  134. USE_I18N = True
  135. LOCALE_PATHS = []
  136. # Settings for language cookie
  137. LANGUAGE_COOKIE_NAME = 'django_language'
  138. LANGUAGE_COOKIE_AGE = None
  139. LANGUAGE_COOKIE_DOMAIN = None
  140. LANGUAGE_COOKIE_PATH = '/'
  141. # If you set this to True, Django will format dates, numbers and calendars
  142. # according to user current locale.
  143. USE_L10N = False
  144. # Not-necessarily-technical managers of the site. They get broken link
  145. # notifications and other various emails.
  146. MANAGERS = ADMINS
  147. # Default content type and charset to use for all HttpResponse objects, if a
  148. # MIME type isn't manually specified. These are used to construct the
  149. # Content-Type header.
  150. DEFAULT_CONTENT_TYPE = 'text/html'
  151. DEFAULT_CHARSET = 'utf-8'
  152. # Encoding of files read from disk (template and initial SQL files).
  153. FILE_CHARSET = 'utf-8'
  154. # Email address that error messages come from.
  155. SERVER_EMAIL = 'root@localhost'
  156. # Database connection info. If left empty, will default to the dummy backend.
  157. DATABASES = {}
  158. # Classes used to implement DB routing behavior.
  159. DATABASE_ROUTERS = []
  160. # The email backend to use. For possible shortcuts see django.core.mail.
  161. # The default is to use the SMTP backend.
  162. # Third-party backends can be specified by providing a Python path
  163. # to a module that defines an EmailBackend class.
  164. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  165. # Host for sending email.
  166. EMAIL_HOST = 'localhost'
  167. # Port for sending email.
  168. EMAIL_PORT = 25
  169. # Whether to send SMTP 'Date' header in the local time zone or in UTC.
  170. EMAIL_USE_LOCALTIME = False
  171. # Optional SMTP authentication information for EMAIL_HOST.
  172. EMAIL_HOST_USER = ''
  173. EMAIL_HOST_PASSWORD = ''
  174. EMAIL_USE_TLS = False
  175. EMAIL_USE_SSL = False
  176. EMAIL_SSL_CERTFILE = None
  177. EMAIL_SSL_KEYFILE = None
  178. EMAIL_TIMEOUT = None
  179. # List of strings representing installed apps.
  180. INSTALLED_APPS = []
  181. TEMPLATES = []
  182. # Default form rendering class.
  183. FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
  184. # Default email address to use for various automated correspondence from
  185. # the site managers.
  186. DEFAULT_FROM_EMAIL = 'webmaster@localhost'
  187. # Subject-line prefix for email messages send with django.core.mail.mail_admins
  188. # or ...mail_managers. Make sure to include the trailing space.
  189. EMAIL_SUBJECT_PREFIX = '[Django] '
  190. # Whether to append trailing slashes to URLs.
  191. APPEND_SLASH = True
  192. # Whether to prepend the "www." subdomain to URLs that don't have it.
  193. PREPEND_WWW = False
  194. # Override the server-derived value of SCRIPT_NAME
  195. FORCE_SCRIPT_NAME = None
  196. # List of compiled regular expression objects representing User-Agent strings
  197. # that are not allowed to visit any page, systemwide. Use this for bad
  198. # robots/crawlers. Here are a few examples:
  199. # import re
  200. # DISALLOWED_USER_AGENTS = [
  201. # re.compile(r'^NaverBot.*'),
  202. # re.compile(r'^EmailSiphon.*'),
  203. # re.compile(r'^SiteSucker.*'),
  204. # re.compile(r'^sohu-search'),
  205. # ]
  206. DISALLOWED_USER_AGENTS = []
  207. ABSOLUTE_URL_OVERRIDES = {}
  208. # List of compiled regular expression objects representing URLs that need not
  209. # be reported by BrokenLinkEmailsMiddleware. Here are a few examples:
  210. # import re
  211. # IGNORABLE_404_URLS = [
  212. # re.compile(r'^/apple-touch-icon.*\.png$'),
  213. # re.compile(r'^/favicon.ico$'),
  214. # re.compile(r'^/robots.txt$'),
  215. # re.compile(r'^/phpmyadmin/'),
  216. # re.compile(r'\.(cgi|php|pl)$'),
  217. # ]
  218. IGNORABLE_404_URLS = []
  219. # A secret key for this particular Django installation. Used in secret-key
  220. # hashing algorithms. Set this in your settings, or Django will complain
  221. # loudly.
  222. SECRET_KEY = ''
  223. # Default file storage mechanism that holds media.
  224. DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  225. # Absolute filesystem path to the directory that will hold user-uploaded files.
  226. # Example: "/var/www/example.com/media/"
  227. MEDIA_ROOT = ''
  228. # URL that handles the media served from MEDIA_ROOT.
  229. # Examples: "http://example.com/media/", "http://media.example.com/"
  230. MEDIA_URL = ''
  231. # Absolute path to the directory static files should be collected to.
  232. # Example: "/var/www/example.com/static/"
  233. STATIC_ROOT = None
  234. # URL that handles the static files served from STATIC_ROOT.
  235. # Example: "http://example.com/static/", "http://static.example.com/"
  236. STATIC_URL = None
  237. # List of upload handler classes to be applied in order.
  238. FILE_UPLOAD_HANDLERS = [
  239. 'django.core.files.uploadhandler.MemoryFileUploadHandler',
  240. 'django.core.files.uploadhandler.TemporaryFileUploadHandler',
  241. ]
  242. # Maximum size, in bytes, of a request before it will be streamed to the
  243. # file system instead of into memory.
  244. FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB
  245. # Maximum size in bytes of request data (excluding file uploads) that will be
  246. # read before a SuspiciousOperation (RequestDataTooBig) is raised.
  247. DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB
  248. # Maximum number of GET/POST parameters that will be read before a
  249. # SuspiciousOperation (TooManyFieldsSent) is raised.
  250. DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
  251. # Directory in which upload streamed files will be temporarily saved. A value of
  252. # `None` will make Django use the operating system's default temporary directory
  253. # (i.e. "/tmp" on *nix systems).
  254. FILE_UPLOAD_TEMP_DIR = None
  255. # The numeric mode to set newly-uploaded files to. The value should be a mode
  256. # you'd pass directly to os.chmod; see https://docs.python.org/library/os.html#files-and-directories.
  257. FILE_UPLOAD_PERMISSIONS = None
  258. # The numeric mode to assign to newly-created directories, when uploading files.
  259. # The value should be a mode as you'd pass to os.chmod;
  260. # see https://docs.python.org/library/os.html#files-and-directories.
  261. FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
  262. # Python module path where user will place custom format definition.
  263. # The directory where this setting is pointing should contain subdirectories
  264. # named as the locales, containing a formats.py file
  265. # (i.e. "myproject.locale" for myproject/locale/en/formats.py etc. use)
  266. FORMAT_MODULE_PATH = None
  267. # Default formatting for date objects. See all available format strings here:
  268. # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  269. DATE_FORMAT = 'N j, Y'
  270. # Default formatting for datetime objects. See all available format strings here:
  271. # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  272. DATETIME_FORMAT = 'N j, Y, P'
  273. # Default formatting for time objects. See all available format strings here:
  274. # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  275. TIME_FORMAT = 'P'
  276. # Default formatting for date objects when only the year and month are relevant.
  277. # See all available format strings here:
  278. # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  279. YEAR_MONTH_FORMAT = 'F Y'
  280. # Default formatting for date objects when only the month and day are relevant.
  281. # See all available format strings here:
  282. # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  283. MONTH_DAY_FORMAT = 'F j'
  284. # Default short formatting for date objects. See all available format strings here:
  285. # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  286. SHORT_DATE_FORMAT = 'm/d/Y'
  287. # Default short formatting for datetime objects.
  288. # See all available format strings here:
  289. # https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
  290. SHORT_DATETIME_FORMAT = 'm/d/Y P'
  291. # Default formats to be used when parsing dates from input boxes, in order
  292. # See all available format string here:
  293. # https://docs.python.org/library/datetime.html#strftime-behavior
  294. # * Note that these format strings are different from the ones to display dates
  295. DATE_INPUT_FORMATS = [
  296. '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
  297. '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006'
  298. '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006'
  299. '%B %d %Y', '%B %d, %Y', # 'October 25 2006', 'October 25, 2006'
  300. '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006'
  301. ]
  302. # Default formats to be used when parsing times from input boxes, in order
  303. # See all available format string here:
  304. # https://docs.python.org/library/datetime.html#strftime-behavior
  305. # * Note that these format strings are different from the ones to display dates
  306. TIME_INPUT_FORMATS = [
  307. '%H:%M:%S', # '14:30:59'
  308. '%H:%M:%S.%f', # '14:30:59.000200'
  309. '%H:%M', # '14:30'
  310. ]
  311. # Default formats to be used when parsing dates and times from input boxes,
  312. # in order
  313. # See all available format string here:
  314. # https://docs.python.org/library/datetime.html#strftime-behavior
  315. # * Note that these format strings are different from the ones to display dates
  316. DATETIME_INPUT_FORMATS = [
  317. '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
  318. '%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200'
  319. '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
  320. '%Y-%m-%d', # '2006-10-25'
  321. '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
  322. '%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200'
  323. '%m/%d/%Y %H:%M', # '10/25/2006 14:30'
  324. '%m/%d/%Y', # '10/25/2006'
  325. '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
  326. '%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200'
  327. '%m/%d/%y %H:%M', # '10/25/06 14:30'
  328. '%m/%d/%y', # '10/25/06'
  329. ]
  330. # First day of week, to be used on calendars
  331. # 0 means Sunday, 1 means Monday...
  332. FIRST_DAY_OF_WEEK = 0
  333. # Decimal separator symbol
  334. DECIMAL_SEPARATOR = '.'
  335. # Boolean that sets whether to add thousand separator when formatting numbers
  336. USE_THOUSAND_SEPARATOR = False
  337. # Number of digits that will be together, when splitting them by
  338. # THOUSAND_SEPARATOR. 0 means no grouping, 3 means splitting by thousands...
  339. NUMBER_GROUPING = 0
  340. # Thousand separator symbol
  341. THOUSAND_SEPARATOR = ','
  342. # The tablespaces to use for each model when not specified otherwise.
  343. DEFAULT_TABLESPACE = ''
  344. DEFAULT_INDEX_TABLESPACE = ''
  345. # Default X-Frame-Options header value
  346. X_FRAME_OPTIONS = 'SAMEORIGIN'
  347. USE_X_FORWARDED_HOST = False
  348. USE_X_FORWARDED_PORT = False
  349. # The Python dotted path to the WSGI application that Django's internal server
  350. # (runserver) will use. If `None`, the return value of
  351. # 'django.core.wsgi.get_wsgi_application' is used, thus preserving the same
  352. # behavior as previous versions of Django. Otherwise this should point to an
  353. # actual WSGI application object.
  354. WSGI_APPLICATION = None
  355. # If your Django app is behind a proxy that sets a header to specify secure
  356. # connections, AND that proxy ensures that user-submitted headers with the
  357. # same name are ignored (so that people can't spoof it), set this value to
  358. # a tuple of (header_name, header_value). For any requests that come in with
  359. # that header/value, request.is_secure() will return True.
  360. # WARNING! Only set this if you fully understand what you're doing. Otherwise,
  361. # you may be opening yourself up to a security risk.
  362. SECURE_PROXY_SSL_HEADER = None
  363. ##############
  364. # MIDDLEWARE #
  365. ##############
  366. # List of middleware to use. Order is important; in the request phase, these
  367. # middleware will be applied in the order given, and in the response
  368. # phase the middleware will be applied in reverse order.
  369. MIDDLEWARE = []
  370. ############
  371. # SESSIONS #
  372. ############
  373. # Cache to store session data if using the cache session backend.
  374. SESSION_CACHE_ALIAS = 'default'
  375. # Cookie name. This can be whatever you want.
  376. SESSION_COOKIE_NAME = 'sessionid'
  377. # Age of cookie, in seconds (default: 2 weeks).
  378. SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2
  379. # A string like "example.com", or None for standard domain cookie.
  380. SESSION_COOKIE_DOMAIN = None
  381. # Whether the session cookie should be secure (https:// only).
  382. SESSION_COOKIE_SECURE = False
  383. # The path of the session cookie.
  384. SESSION_COOKIE_PATH = '/'
  385. # Whether to use the HttpOnly flag.
  386. SESSION_COOKIE_HTTPONLY = True
  387. # Whether to set the flag restricting cookie leaks on cross-site requests.
  388. # This can be 'Lax', 'Strict', or None to disable the flag.
  389. SESSION_COOKIE_SAMESITE = 'Lax'
  390. # Whether to save the session data on every request.
  391. SESSION_SAVE_EVERY_REQUEST = False
  392. # Whether a user's session cookie expires when the Web browser is closed.
  393. SESSION_EXPIRE_AT_BROWSER_CLOSE = False
  394. # The module to store session data
  395. SESSION_ENGINE = 'django.contrib.sessions.backends.db'
  396. # Directory to store session files if using the file session module. If None,
  397. # the backend will use a sensible default.
  398. SESSION_FILE_PATH = None
  399. # class to serialize session data
  400. SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
  401. #########
  402. # CACHE #
  403. #########
  404. # The cache backends to use.
  405. CACHES = {
  406. 'default': {
  407. 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
  408. }
  409. }
  410. CACHE_MIDDLEWARE_KEY_PREFIX = ''
  411. CACHE_MIDDLEWARE_SECONDS = 600
  412. CACHE_MIDDLEWARE_ALIAS = 'default'
  413. ##################
  414. # AUTHENTICATION #
  415. ##################
  416. AUTH_USER_MODEL = 'auth.User'
  417. AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
  418. LOGIN_URL = '/accounts/login/'
  419. LOGIN_REDIRECT_URL = '/accounts/profile/'
  420. LOGOUT_REDIRECT_URL = None
  421. # The number of days a password reset link is valid for
  422. PASSWORD_RESET_TIMEOUT_DAYS = 3
  423. # the first hasher in this list is the preferred algorithm. any
  424. # password using different algorithms will be converted automatically
  425. # upon login
  426. PASSWORD_HASHERS = [
  427. 'django.contrib.auth.hashers.PBKDF2PasswordHasher',
  428. 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
  429. 'django.contrib.auth.hashers.Argon2PasswordHasher',
  430. 'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
  431. ]
  432. AUTH_PASSWORD_VALIDATORS = []
  433. ###########
  434. # SIGNING #
  435. ###########
  436. SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
  437. ########
  438. # CSRF #
  439. ########
  440. # Dotted path to callable to be used as view when a request is
  441. # rejected by the CSRF middleware.
  442. CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
  443. # Settings for CSRF cookie.
  444. CSRF_COOKIE_NAME = 'csrftoken'
  445. CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52
  446. CSRF_COOKIE_DOMAIN = None
  447. CSRF_COOKIE_PATH = '/'
  448. CSRF_COOKIE_SECURE = False
  449. CSRF_COOKIE_HTTPONLY = False
  450. CSRF_COOKIE_SAMESITE = 'Lax'
  451. CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
  452. CSRF_TRUSTED_ORIGINS = []
  453. CSRF_USE_SESSIONS = False
  454. ############
  455. # MESSAGES #
  456. ############
  457. # Class to use as messages backend
  458. MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
  459. # Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within
  460. # django.contrib.messages to avoid imports in this settings file.
  461. ###########
  462. # LOGGING #
  463. ###########
  464. # The callable to use to configure logging
  465. LOGGING_CONFIG = 'logging.config.dictConfig'
  466. # Custom logging configuration.
  467. LOGGING = {}
  468. # Default exception reporter filter class used in case none has been
  469. # specifically assigned to the HttpRequest instance.
  470. DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
  471. ###########
  472. # TESTING #
  473. ###########
  474. # The name of the class to use to run the test suite
  475. TEST_RUNNER = 'django.test.runner.DiscoverRunner'
  476. # Apps that don't need to be serialized at test database creation time
  477. # (only apps with migrations are to start with)
  478. TEST_NON_SERIALIZED_APPS = []
  479. ############
  480. # FIXTURES #
  481. ############
  482. # The list of directories to search for fixtures
  483. FIXTURE_DIRS = []
  484. ###############
  485. # STATICFILES #
  486. ###############
  487. # A list of locations of additional static files
  488. STATICFILES_DIRS = []
  489. # The default file storage backend used during the build process
  490. STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
  491. # List of finder classes that know how to find static files in
  492. # various locations.
  493. STATICFILES_FINDERS = [
  494. 'django.contrib.staticfiles.finders.FileSystemFinder',
  495. 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  496. # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
  497. ]
  498. ##############
  499. # MIGRATIONS #
  500. ##############
  501. # Migration module overrides for apps, by app label.
  502. MIGRATION_MODULES = {}
  503. #################
  504. # SYSTEM CHECKS #
  505. #################
  506. # List of all issues generated by system checks that should be silenced. Light
  507. # issues like warnings, infos or debugs will not generate a message. Silencing
  508. # serious issues like errors and criticals does not result in hiding the
  509. # message, but Django will not stop you from e.g. running server.
  510. SILENCED_SYSTEM_CHECKS = []
  511. #######################
  512. # SECURITY MIDDLEWARE #
  513. #######################
  514. SECURE_BROWSER_XSS_FILTER = False
  515. SECURE_CONTENT_TYPE_NOSNIFF = False
  516. SECURE_HSTS_INCLUDE_SUBDOMAINS = False
  517. SECURE_HSTS_PRELOAD = False
  518. SECURE_HSTS_SECONDS = 0
  519. SECURE_REDIRECT_EXEMPT = []
  520. SECURE_SSL_HOST = None
  521. SECURE_SSL_REDIRECT = False