Advertisement
Guest User

Untitled

a guest
May 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. """
  2. Django settings for project_backend project.
  3.  
  4. Generated by 'django-admin startproject' using Django 2.0.4.
  5.  
  6. For more information on this file, see
  7. https://docs.djangoproject.com/en/2.0/topics/settings/
  8.  
  9. For the full list of settings and their values, see
  10. https://docs.djangoproject.com/en/2.0/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.  
  19. # Quick-start development settings - unsuitable for production
  20. # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
  21.  
  22. # SECURITY WARNING: keep the secret key used in production secret!
  23. SECRET_KEY = 'scrubscrubscrub'
  24.  
  25. # SECURITY WARNING: don't run with debug turned on in production!
  26. DEBUG = True
  27.  
  28. ALLOWED_HOSTS = [
  29. '127.0.0.1',
  30. '0.0.0.0'
  31. ]
  32.  
  33.  
  34. # Application definition
  35.  
  36. INSTALLED_APPS = [
  37. 'django.contrib.admin',
  38. 'django.contrib.auth',
  39. 'django.contrib.contenttypes',
  40. 'django.contrib.sessions',
  41. 'django.contrib.messages',
  42. 'django.contrib.staticfiles',
  43.  
  44. 'rest_framework',
  45. 'phonenumber_field',
  46.  
  47. 'businesses',
  48. 'users',
  49. 'coupons',
  50. ]
  51.  
  52. MIDDLEWARE = [
  53. 'django.middleware.security.SecurityMiddleware',
  54. 'django.contrib.sessions.middleware.SessionMiddleware',
  55. 'django.middleware.common.CommonMiddleware',
  56. 'django.middleware.csrf.CsrfViewMiddleware',
  57. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  58. 'django.contrib.messages.middleware.MessageMiddleware',
  59. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  60. ]
  61.  
  62. ROOT_URLCONF = 'project_backend.urls'
  63.  
  64. TEMPLATES = [
  65. {
  66. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  67. 'DIRS': [],
  68. 'APP_DIRS': True,
  69. 'OPTIONS': {
  70. 'context_processors': [
  71. 'django.template.context_processors.debug',
  72. 'django.template.context_processors.request',
  73. 'django.contrib.auth.context_processors.auth',
  74. 'django.contrib.messages.context_processors.messages',
  75. ],
  76. },
  77. },
  78. ]
  79.  
  80. WSGI_APPLICATION = 'project_backend.wsgi.application'
  81.  
  82.  
  83. # Database
  84. # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
  85.  
  86. DATABASES = {
  87. 'default': {
  88. 'ENGINE': 'django.db.backends.postgresql',
  89. 'NAME': os.environ.get('DB_NAME'),
  90. 'USER': os.environ.get('DB_USER'),
  91. 'PASSWORD': os.environ.get('DB_PASSWORD'),
  92. 'HOST': os.environ.get('DB_HOST', '127.0.0.1'),
  93. }
  94. }
  95.  
  96.  
  97. AUTHENTICATION_BACKENDS = (
  98. 'django.contrib.auth.backends.ModelBackend', # default
  99. )
  100.  
  101. # Password validation
  102. # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
  103.  
  104. AUTH_PASSWORD_VALIDATORS = [
  105. {
  106. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  107. },
  108. {
  109. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  110. },
  111. {
  112. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  113. },
  114. {
  115. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  116. },
  117. ]
  118.  
  119.  
  120. # Internationalization
  121. # https://docs.djangoproject.com/en/2.0/topics/i18n/
  122.  
  123. LANGUAGE_CODE = 'en-us'
  124.  
  125. TIME_ZONE = 'UTC'
  126.  
  127. USE_I18N = True
  128.  
  129. USE_L10N = True
  130.  
  131. USE_TZ = True
  132.  
  133.  
  134. # Static files (CSS, JavaScript, Images)
  135. # https://docs.djangoproject.com/en/2.0/howto/static-files/
  136.  
  137. STATIC_URL = '/static/'
  138.  
  139. AUTH_USER_MODEL = 'users.User'
  140.  
  141. # Date settings
  142. DATE_INPUT_FORMATS = ['%d-%m-%Y']
  143.  
  144. #Address settings
  145. GOOGLE_API_KEY = 'scrubscrubscrub'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement