|
| 1 | +import os |
| 2 | + |
| 3 | +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
| 4 | +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 5 | + |
| 6 | + |
| 7 | +# Quick-start development settings - unsuitable for production |
| 8 | +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ |
| 9 | + |
| 10 | +# SECURITY WARNING: keep the secret key used in production secret! |
| 11 | +SECRET_KEY = '()!xq2ufm%j@n^!v^p08&w87vvg)rk^=aoj8u1(4xho5iuh-)l' |
| 12 | + |
| 13 | +# SECURITY WARNING: don't run with debug turned on in production! |
| 14 | +DEBUG = True |
| 15 | + |
| 16 | +ALLOWED_HOSTS = [] |
| 17 | + |
| 18 | + |
| 19 | +# Application definition |
| 20 | + |
| 21 | +INSTALLED_APPS = [ |
| 22 | + 'django.contrib.admin', |
| 23 | + 'django.contrib.auth', |
| 24 | + 'django.contrib.contenttypes', |
| 25 | + 'django.contrib.sessions', |
| 26 | + 'django.contrib.messages', |
| 27 | + 'django.contrib.staticfiles', |
| 28 | + |
| 29 | + 'templated_mail', |
| 30 | + |
| 31 | + 'simple', |
| 32 | +] |
| 33 | + |
| 34 | +MIDDLEWARE = [ |
| 35 | + 'django.middleware.security.SecurityMiddleware', |
| 36 | + 'django.contrib.sessions.middleware.SessionMiddleware', |
| 37 | + 'django.middleware.common.CommonMiddleware', |
| 38 | + 'django.middleware.csrf.CsrfViewMiddleware', |
| 39 | + 'django.contrib.auth.middleware.AuthenticationMiddleware', |
| 40 | + 'django.contrib.messages.middleware.MessageMiddleware', |
| 41 | + 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
| 42 | +] |
| 43 | + |
| 44 | +ROOT_URLCONF = 'config.urls' |
| 45 | + |
| 46 | +TEMPLATES = [ |
| 47 | + { |
| 48 | + 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
| 49 | + 'DIRS': ['templates'], |
| 50 | + 'APP_DIRS': True, |
| 51 | + 'OPTIONS': { |
| 52 | + 'context_processors': [ |
| 53 | + 'django.template.context_processors.debug', |
| 54 | + 'django.template.context_processors.request', |
| 55 | + 'django.contrib.auth.context_processors.auth', |
| 56 | + 'django.contrib.messages.context_processors.messages', |
| 57 | + ], |
| 58 | + }, |
| 59 | + }, |
| 60 | +] |
| 61 | + |
| 62 | +WSGI_APPLICATION = 'config.wsgi.application' |
| 63 | + |
| 64 | + |
| 65 | +# Database |
| 66 | +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases |
| 67 | + |
| 68 | +DATABASES = { |
| 69 | + 'default': { |
| 70 | + 'ENGINE': 'django.db.backends.sqlite3', |
| 71 | + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
| 72 | + } |
| 73 | +} |
| 74 | + |
| 75 | +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
| 76 | + |
| 77 | +# Password validation |
| 78 | +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators |
| 79 | + |
| 80 | +AUTH_PASSWORD_VALIDATORS = [ |
| 81 | + { |
| 82 | + 'NAME': 'django.contrib.auth.password_validation.' |
| 83 | + 'UserAttributeSimilarityValidator', |
| 84 | + }, |
| 85 | + { |
| 86 | + 'NAME': 'django.contrib.auth.password_validation.' |
| 87 | + 'MinimumLengthValidator', |
| 88 | + }, |
| 89 | + { |
| 90 | + 'NAME': 'django.contrib.auth.password_validation.' |
| 91 | + 'CommonPasswordValidator', |
| 92 | + }, |
| 93 | + { |
| 94 | + 'NAME': 'django.contrib.auth.password_validation.' |
| 95 | + 'NumericPasswordValidator', |
| 96 | + }, |
| 97 | +] |
| 98 | + |
| 99 | + |
| 100 | +# Internationalization |
| 101 | +# https://docs.djangoproject.com/en/1.11/topics/i18n/ |
| 102 | + |
| 103 | +LANGUAGE_CODE = 'en-us' |
| 104 | + |
| 105 | +TIME_ZONE = 'UTC' |
| 106 | + |
| 107 | +USE_I18N = True |
| 108 | + |
| 109 | +USE_L10N = True |
| 110 | + |
| 111 | +USE_TZ = True |
| 112 | + |
| 113 | + |
| 114 | +# Static files (CSS, JavaScript, Images) |
| 115 | +# https://docs.djangoproject.com/en/1.11/howto/static-files/ |
| 116 | + |
| 117 | +STATIC_URL = '/static/' |
0 commit comments