global_settings.py 22 KB

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