Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. """
  2. Django settings for deals4U project.
  3.  
  4. Generated by 'django-admin startproject' using Django 2.2.7.
  5.  
  6. For more information on this file, see
  7. https://docs.djangoproject.com/en/2.2/topics/settings/
  8.  
  9. For the full list of settings and their values, see
  10. https://docs.djangoproject.com/en/2.2/ref/settings/
  11. """
  12.  
  13. import os
  14.  
  15. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  16. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  17.  
  18. # Quick-start development settings - unsuitable for production
  19. # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
  20.  
  21. # SECURITY WARNING: keep the secret key used in production secret!
  22. SECRET_KEY = 'j5j)u*f2)1=8we4$y@%m%$nr!$qw03j=mweh^vgq4+ox&^nzi6'
  23.  
  24. # SECURITY WARNING: don't run with debug turned on in production!
  25. DEBUG = True
  26.  
  27. ALLOWED_HOSTS = ['*']
  28.  
  29. # Application definition
  30.  
  31. INSTALLED_APPS = [
  32.  
  33. # Own apps
  34. 'users',
  35. 'pages',
  36. 'offers',
  37.  
  38. # 3rd party apps
  39. 'crispy_forms',
  40.  
  41. # Django apps
  42. 'django.contrib.admin',
  43. 'django.contrib.auth',
  44. 'django.contrib.contenttypes',
  45. 'django.contrib.sessions',
  46. 'django.contrib.messages',
  47. 'whitenoise.runserver_nostatic',
  48. 'django.contrib.staticfiles',
  49.  
  50. ]
  51.  
  52. MIDDLEWARE = [
  53. 'django.middleware.security.SecurityMiddleware',
  54. 'django.contrib.sessions.middleware.SessionMiddleware',
  55. 'whitenoise.middleware.WhiteNoiseMiddleware',
  56. 'django.middleware.common.CommonMiddleware',
  57. 'django.middleware.csrf.CsrfViewMiddleware',
  58. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  59. 'django.contrib.messages.middleware.MessageMiddleware',
  60. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  61. ]
  62.  
  63. ROOT_URLCONF = 'deals4U.urls'
  64.  
  65. TEMPLATES = [
  66. {
  67. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  68. 'DIRS': [os.path.join(BASE_DIR, 'templates')],
  69. 'APP_DIRS': True,
  70. 'OPTIONS': {
  71. 'context_processors': [
  72. 'django.template.context_processors.debug',
  73. 'django.template.context_processors.request',
  74. 'django.contrib.auth.context_processors.auth',
  75. 'django.contrib.messages.context_processors.messages',
  76. ],
  77. },
  78. },
  79. ]
  80.  
  81. WSGI_APPLICATION = 'deals4U.wsgi.application'
  82.  
  83. # Database
  84. # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
  85.  
  86. DATABASES = {
  87. 'default': {
  88. 'ENGINE': 'django.db.backends.sqlite3',
  89. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  90. }
  91. }
  92.  
  93. # Password validation
  94. # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
  95.  
  96. AUTH_PASSWORD_VALIDATORS = [
  97. {
  98. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  99. },
  100. {
  101. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  102. },
  103. {
  104. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  105. },
  106. {
  107. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  108. },
  109. ]
  110.  
  111. # Internationalization
  112. # https://docs.djangoproject.com/en/2.2/topics/i18n/
  113.  
  114. LANGUAGE_CODE = 'en-us'
  115.  
  116. TIME_ZONE = 'Europe/Athens'
  117.  
  118. USE_I18N = True
  119.  
  120. USE_L10N = True
  121.  
  122. USE_TZ = True
  123.  
  124. # Static files (CSS, JavaScript, Images)
  125. # https://docs.djangoproject.com/en/2.2/howto/static-files/
  126.  
  127. STATIC_URL = '/static/'
  128. STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
  129. STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
  130. STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
  131.  
  132. LOGIN_REDIRECT_URL = 'home'
  133. LOGOUT_REDIRECT_URL = 'home'
  134.  
  135. AUTH_USER_MODEL = 'users.CustomUser'
  136.  
  137. CRISPY_TEMPLATE_PACK = 'bootstrap4'
  138.  
  139. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  140. EMAIL_HOST = 'smtp.gmail.com'
  141. EMAIL_HOST_USER = 'prosfores4uadm@gmail.com'
  142. EMAIL_HOST_PASSWORD = 'pqapltrnaldylshj'
  143. EMAIL_PORT = 587
  144. EMAIL_USE_TLS = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement