Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
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 23KB

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