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