Advertisement
Guest User

Untitled

a guest
Dec 19th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. """
  2. Django settings for checkingdb project.
  3.  
  4. Generated by 'django-admin startproject' using Django 3.1.4.
  5.  
  6. For more information on this file, see
  7. https://docs.djangoproject.com/en/3.1/topics/settings/
  8.  
  9. For the full list of settings and their values, see
  10. https://docs.djangoproject.com/en/3.1/ref/settings/
  11. """
  12.  
  13. from pathlib import Path
  14.  
  15. # Build paths inside the project like this: BASE_DIR / 'subdir'.
  16. BASE_DIR = Path(__file__).resolve().parent.parent
  17.  
  18.  
  19. # Quick-start development settings - unsuitable for production
  20. # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
  21.  
  22. # SECURITY WARNING: keep the secret key used in production secret!
  23. SECRET_KEY = 'mo2ha83mye7yhu#i#7c+)!tmmk%cxq#)fw$2wb6-($86-u!)41'
  24.  
  25. # SECURITY WARNING: don't run with debug turned on in production!
  26. DEBUG = True
  27.  
  28. ALLOWED_HOSTS = []
  29.  
  30. DATABASE_ROUTERS = ['contenter.router.MyDBRouter']
  31.  
  32.  
  33. # Application definition
  34.  
  35. INSTALLED_APPS = [
  36. 'django.contrib.admin',
  37. 'django.contrib.auth',
  38. 'django.contrib.contenttypes',
  39. 'django.contrib.sessions',
  40. 'django.contrib.messages',
  41. 'django.contrib.staticfiles',
  42. 'contenter',
  43. 'customer',
  44. 'userchecking',
  45. ]
  46.  
  47. MIDDLEWARE = [
  48. 'django.middleware.security.SecurityMiddleware',
  49. 'django.contrib.sessions.middleware.SessionMiddleware',
  50. 'django.middleware.common.CommonMiddleware',
  51. 'django.middleware.csrf.CsrfViewMiddleware',
  52. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  53. 'django.contrib.messages.middleware.MessageMiddleware',
  54. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  55. ]
  56.  
  57. ROOT_URLCONF = 'checkingdb.urls'
  58.  
  59. TEMPLATES = [
  60. {
  61. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  62. 'DIRS': [],
  63. 'APP_DIRS': True,
  64. 'OPTIONS': {
  65. 'context_processors': [
  66. 'django.template.context_processors.debug',
  67. 'django.template.context_processors.request',
  68. 'django.contrib.auth.context_processors.auth',
  69. 'django.contrib.messages.context_processors.messages',
  70. ],
  71. },
  72. },
  73. ]
  74.  
  75. WSGI_APPLICATION = 'checkingdb.wsgi.application'
  76.  
  77.  
  78. # Database
  79. # https://docs.djangoproject.com/en/3.1/ref/settings/#databases
  80.  
  81. DATABASES = {
  82. 'default': { },
  83. 'usersdb': {
  84. 'ENGINE': 'django.db.backends.postgresql',
  85. 'NAME': 'usersdb',
  86. 'USER': 'postgres',
  87. 'PASSWORD': 'postgres',
  88. 'HOST': 'localhost',
  89. 'PORT': '5432',
  90.  
  91. },
  92. 'customerdb': {
  93. 'ENGINE': 'django.db.backends.postgresql',
  94. 'NAME': 'customerdb',
  95. 'USER': 'postgres',
  96. 'PASSWORD': 'postgres',
  97. 'HOST': 'localhost',
  98. 'PORT': '5432',
  99.  
  100. },
  101. 'contentdb': {
  102. 'ENGINE': 'django.db.backends.postgresql',
  103. 'NAME': 'contentdb',
  104. 'USER': 'postgres',
  105. 'PASSWORD': 'postgres',
  106. 'HOST': 'localhost',
  107. 'PORT': '5432'
  108. }
  109. }
  110.  
  111.  
  112. # Password validation
  113. # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
  114.  
  115. AUTH_PASSWORD_VALIDATORS = [
  116. {
  117. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  118. },
  119. {
  120. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  121. },
  122. {
  123. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  124. },
  125. {
  126. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  127. },
  128. ]
  129.  
  130.  
  131. # Internationalization
  132. # https://docs.djangoproject.com/en/3.1/topics/i18n/
  133.  
  134. LANGUAGE_CODE = 'en-us'
  135.  
  136. TIME_ZONE = 'UTC'
  137.  
  138. USE_I18N = True
  139.  
  140. USE_L10N = True
  141.  
  142. USE_TZ = True
  143.  
  144.  
  145. # Static files (CSS, JavaScript, Images)
  146. # https://docs.djangoproject.com/en/3.1/howto/static-files/
  147.  
  148. STATIC_URL = '/static/'
  149.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement