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.

120 lines
3.0 KiB

  1. """
  2. Django settings for sample_site project.
  3. Generated by 'django-admin startproject' using Django 3.0.3.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/3.0/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/3.0/ref/settings/
  8. """
  9. import os
  10. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  11. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = 'gfrwnio78zchwnxps#3$#i%^nhesopmrjayje%m9_*53v5^$0%'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. ALLOWED_HOSTS = []
  19. # Application definition
  20. INSTALLED_APPS = [
  21. 'django.contrib.admin',
  22. 'django.contrib.auth',
  23. 'django.contrib.contenttypes',
  24. 'django.contrib.sessions',
  25. 'django.contrib.messages',
  26. 'django.contrib.staticfiles',
  27. ]
  28. MIDDLEWARE = [
  29. 'django.middleware.security.SecurityMiddleware',
  30. 'django.contrib.sessions.middleware.SessionMiddleware',
  31. 'django.middleware.common.CommonMiddleware',
  32. 'django.middleware.csrf.CsrfViewMiddleware',
  33. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  34. 'django.contrib.messages.middleware.MessageMiddleware',
  35. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  36. ]
  37. ROOT_URLCONF = 'sample_site.urls'
  38. TEMPLATES = [
  39. {
  40. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  41. 'DIRS': [],
  42. 'APP_DIRS': True,
  43. 'OPTIONS': {
  44. 'context_processors': [
  45. 'django.template.context_processors.debug',
  46. 'django.template.context_processors.request',
  47. 'django.contrib.auth.context_processors.auth',
  48. 'django.contrib.messages.context_processors.messages',
  49. ],
  50. },
  51. },
  52. ]
  53. WSGI_APPLICATION = 'sample_site.wsgi.application'
  54. # Database
  55. # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
  56. DATABASES = {
  57. 'default': {
  58. 'ENGINE': 'django.db.backends.sqlite3',
  59. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  60. }
  61. }
  62. # Password validation
  63. # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
  64. AUTH_PASSWORD_VALIDATORS = [
  65. {
  66. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  67. },
  68. {
  69. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  70. },
  71. {
  72. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  73. },
  74. {
  75. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  76. },
  77. ]
  78. # Internationalization
  79. # https://docs.djangoproject.com/en/3.0/topics/i18n/
  80. LANGUAGE_CODE = 'en-us'
  81. TIME_ZONE = 'UTC'
  82. USE_I18N = True
  83. USE_L10N = True
  84. USE_TZ = True
  85. # Static files (CSS, JavaScript, Images)
  86. # https://docs.djangoproject.com/en/3.0/howto/static-files/
  87. STATIC_URL = '/static/'