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 22 KiB

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