1
|
|
|
""" |
2
|
|
|
Django settings for nibble project. |
3
|
|
|
|
4
|
|
|
For more information on this file, see |
5
|
|
|
https://docs.djangoproject.com/en/1.11/topics/settings/ |
6
|
|
|
|
7
|
|
|
For the full list of settings and their values, see |
8
|
|
|
https://docs.djangoproject.com/en/1.11/ref/settings/ |
9
|
|
|
""" |
10
|
|
|
|
11
|
|
|
import os |
12
|
|
|
|
13
|
|
|
|
14
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) |
15
|
|
|
|
16
|
|
|
|
17
|
|
|
# SECURITY WARNING: keep the secret key used in production secret! |
18
|
|
|
SECRET_KEY = os.environ.get('SECRET_KEY', 'please-change-me') |
19
|
|
|
|
20
|
|
|
# SECURITY WARNING: don't run with debug turned on in production! |
21
|
|
|
DEBUG = True |
22
|
|
|
|
23
|
|
|
TEMPLATES = [ |
24
|
|
|
{ |
25
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates', |
26
|
|
|
'APP_DIRS': True, |
27
|
|
|
'OPTIONS': { |
28
|
|
|
'context_processors': [ |
29
|
|
|
'django.contrib.auth.context_processors.auth', |
30
|
|
|
], |
31
|
|
|
}, |
32
|
|
|
}, |
33
|
|
|
] |
34
|
|
|
|
35
|
|
|
ALLOWED_HOSTS = [ |
36
|
|
|
'*', # STRANGER DANGER |
37
|
|
|
] |
38
|
|
|
|
39
|
|
|
|
40
|
|
|
# Application definition |
41
|
|
|
|
42
|
|
|
INSTALLED_APPS = ( |
43
|
|
|
'django.contrib.admin', |
44
|
|
|
'django.contrib.auth', |
45
|
|
|
'django.contrib.contenttypes', |
46
|
|
|
'django.contrib.sessions', |
47
|
|
|
'django.contrib.messages', |
48
|
|
|
'django.contrib.staticfiles', |
49
|
|
|
'behave_django', |
50
|
|
|
'comics' |
51
|
|
|
) |
52
|
|
|
|
53
|
|
|
MIDDLEWARE_CLASSES = ( |
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.auth.middleware.SessionAuthenticationMiddleware', |
59
|
|
|
'django.contrib.messages.middleware.MessageMiddleware', |
60
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
61
|
|
|
) |
62
|
|
|
|
63
|
|
|
ROOT_URLCONF = 'nibble.urls' |
64
|
|
|
|
65
|
|
|
WSGI_APPLICATION = 'nibble.wsgi.application' |
66
|
|
|
|
67
|
|
|
|
68
|
|
|
# Database |
69
|
|
|
DATABASES = { |
70
|
|
|
'default': { |
71
|
|
|
'ENGINE': 'django.db.backends.sqlite3', |
72
|
|
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
73
|
|
|
} |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
# Internationalization |
77
|
|
|
LANGUAGE_CODE = 'en-us' |
78
|
|
|
|
79
|
|
|
TIME_ZONE = 'UTC' |
80
|
|
|
|
81
|
|
|
USE_I18N = True |
82
|
|
|
|
83
|
|
|
USE_L10N = True |
84
|
|
|
|
85
|
|
|
USE_TZ = True |
86
|
|
|
|
87
|
|
|
|
88
|
|
|
# Static files (CSS, JavaScript, Images) |
89
|
|
|
STATIC_URL = '/static/' |
90
|
|
|
STATIC_ROOT = 'static' |
91
|
|
|
|
92
|
|
|
STATICFILES_DIRS = ( |
93
|
|
|
) |
94
|
|
|
|