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.

130 lines
3.3 KiB

  1. """
  2. Django settings for project1 project.
  3. Generated by 'django-admin startproject' using Django 3.2.8.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/3.2/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/3.2/ref/settings/
  8. """
  9. from pathlib import Path
  10. # Build paths inside the project like this: BASE_DIR / 'subdir'.
  11. BASE_DIR = Path(__file__).resolve().parent.parent
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = 'django-insecure-^+_nr8efle)m_bv=c$b9d3p3e_tn32%tirtnwlu6(w0$t)o@w_'
  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. 'app1',
  28. ]
  29. MIDDLEWARE = [
  30. 'django.middleware.security.SecurityMiddleware',
  31. 'django.contrib.sessions.middleware.SessionMiddleware',
  32. 'django.middleware.common.CommonMiddleware',
  33. 'django.middleware.csrf.CsrfViewMiddleware',
  34. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  35. 'django.contrib.messages.middleware.MessageMiddleware',
  36. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  37. ]
  38. ROOT_URLCONF = 'project1.urls'
  39. TEMPLATES = [
  40. {
  41. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  42. 'DIRS': [],
  43. 'APP_DIRS': True,
  44. 'OPTIONS': {
  45. 'context_processors': [
  46. 'django.template.context_processors.debug',
  47. 'django.template.context_processors.request',
  48. 'django.contrib.auth.context_processors.auth',
  49. 'django.contrib.messages.context_processors.messages',
  50. ],
  51. },
  52. },
  53. ]
  54. WSGI_APPLICATION = 'project1.wsgi.application'
  55. # Database
  56. # https://docs.djangoproject.com/en/3.2/ref/settings/#databases
  57. DATABASES = {
  58. 'default': {
  59. 'ENGINE': 'django.db.backends.postgresql',
  60. 'USER': 'postgres',
  61. 'PASSWORD': 'c1secret2qbc',
  62. 'NAME': 'weontheme',
  63. 'HOST': 'db',
  64. 'PORT': 5432,
  65. }
  66. }
  67. # Password validation
  68. # https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
  69. AUTH_PASSWORD_VALIDATORS = [
  70. {
  71. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  72. },
  73. {
  74. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  75. },
  76. {
  77. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  78. },
  79. {
  80. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  81. },
  82. ]
  83. # Internationalization
  84. # https://docs.djangoproject.com/en/3.2/topics/i18n/
  85. LANGUAGE_CODE = 'en-us'
  86. TIME_ZONE = 'UTC'
  87. USE_I18N = True
  88. USE_L10N = True
  89. USE_TZ = True
  90. # Static files (CSS, JavaScript, Images)
  91. # https://docs.djangoproject.com/en/3.2/howto/static-files/
  92. STATIC_URL = '/static/'
  93. # Default primary key field type
  94. # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
  95. DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

Powered by TurnKey Linux.