2017-02-14 21:23:45 +03:00
|
|
|
# flake8: noqa
|
|
|
|
"""
|
|
|
|
Django settings for cookbook project.
|
|
|
|
|
|
|
|
Generated by 'django-admin startproject' using Django 1.9.
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
|
|
https://docs.djangoproject.com/en/1.9/topics/settings/
|
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
|
https://docs.djangoproject.com/en/1.9/ref/settings/
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
|
|
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
2019-06-11 06:54:30 +03:00
|
|
|
SECRET_KEY = "_$=$%eqxk$8ss4n7mtgarw^5$8^d5+c83!vwatr@i_81myb=e4"
|
2017-02-14 21:23:45 +03:00
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
DEBUG = True
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
|
|
|
|
# Application definition
|
|
|
|
|
|
|
|
INSTALLED_APPS = [
|
2019-06-11 06:54:30 +03:00
|
|
|
"django.contrib.admin",
|
|
|
|
"django.contrib.auth",
|
|
|
|
"django.contrib.contenttypes",
|
|
|
|
"django.contrib.sessions",
|
|
|
|
"django.contrib.messages",
|
|
|
|
"django.contrib.staticfiles",
|
|
|
|
"graphene_django",
|
|
|
|
"cookbook.ingredients.apps.IngredientsConfig",
|
|
|
|
"cookbook.recipes.apps.RecipesConfig",
|
2017-02-14 21:23:45 +03:00
|
|
|
]
|
|
|
|
|
2018-10-18 21:33:53 +03:00
|
|
|
MIDDLEWARE = [
|
2019-06-11 06:54:30 +03:00
|
|
|
"django.middleware.security.SecurityMiddleware",
|
|
|
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
|
|
|
"django.middleware.common.CommonMiddleware",
|
|
|
|
"django.middleware.csrf.CsrfViewMiddleware",
|
|
|
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
|
|
|
"django.contrib.messages.middleware.MessageMiddleware",
|
|
|
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
2017-02-14 21:23:45 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
GRAPHENE = {
|
2019-06-11 06:54:30 +03:00
|
|
|
"SCHEMA": "cookbook.schema.schema",
|
|
|
|
"SCHEMA_INDENT": 2,
|
|
|
|
"MIDDLEWARE": ("graphene_django.debug.DjangoDebugMiddleware",),
|
2017-02-14 21:23:45 +03:00
|
|
|
}
|
|
|
|
|
2019-06-11 06:54:30 +03:00
|
|
|
ROOT_URLCONF = "cookbook.urls"
|
2017-02-14 21:23:45 +03:00
|
|
|
|
|
|
|
TEMPLATES = [
|
|
|
|
{
|
2019-06-11 06:54:30 +03:00
|
|
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
|
|
"DIRS": [],
|
|
|
|
"APP_DIRS": True,
|
|
|
|
"OPTIONS": {
|
|
|
|
"context_processors": [
|
|
|
|
"django.template.context_processors.debug",
|
|
|
|
"django.template.context_processors.request",
|
|
|
|
"django.contrib.auth.context_processors.auth",
|
|
|
|
"django.contrib.messages.context_processors.messages",
|
|
|
|
]
|
2017-02-14 21:23:45 +03:00
|
|
|
},
|
2019-06-11 06:54:30 +03:00
|
|
|
}
|
2017-02-14 21:23:45 +03:00
|
|
|
]
|
|
|
|
|
2019-06-11 06:54:30 +03:00
|
|
|
WSGI_APPLICATION = "cookbook.wsgi.application"
|
2017-02-14 21:23:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
# Database
|
|
|
|
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
|
|
|
|
|
|
|
|
DATABASES = {
|
2019-06-11 06:54:30 +03:00
|
|
|
"default": {
|
|
|
|
"ENGINE": "django.db.backends.sqlite3",
|
|
|
|
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
2017-02-14 21:23:45 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Password validation
|
|
|
|
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
|
|
|
|
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
|
|
{
|
2019-06-11 06:54:30 +03:00
|
|
|
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
|
2017-02-14 21:23:45 +03:00
|
|
|
},
|
2019-06-11 06:54:30 +03:00
|
|
|
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
|
|
|
|
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
|
|
|
|
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
|
2017-02-14 21:23:45 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/1.9/topics/i18n/
|
|
|
|
|
2019-06-11 06:54:30 +03:00
|
|
|
LANGUAGE_CODE = "en-us"
|
2017-02-14 21:23:45 +03:00
|
|
|
|
2019-06-11 06:54:30 +03:00
|
|
|
TIME_ZONE = "UTC"
|
2017-02-14 21:23:45 +03:00
|
|
|
|
|
|
|
USE_I18N = True
|
|
|
|
|
|
|
|
USE_L10N = True
|
|
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
|
# https://docs.djangoproject.com/en/1.9/howto/static-files/
|
|
|
|
|
2019-06-11 06:54:30 +03:00
|
|
|
STATIC_URL = "/static/"
|