1
|
|
|
""" |
2
|
|
|
Django settings for django-template 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
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
14
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
15
|
|
|
|
16
|
|
|
# Quick-start development settings - unsuitable for production |
17
|
|
|
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ |
18
|
|
|
|
19
|
|
|
ALLOWED_HOSTS = [ |
20
|
|
|
'localhost', |
21
|
|
|
'127.0.0.1', |
22
|
|
|
] |
23
|
|
|
|
24
|
|
|
# Application definition |
25
|
|
|
|
26
|
|
|
INSTALLED_APPS = [ |
27
|
|
|
'pages', |
28
|
|
|
'tinymce', # Text editor for website backend |
29
|
|
|
'django.contrib.admin', |
30
|
|
|
'django.contrib.auth', |
31
|
|
|
'django.contrib.contenttypes', |
32
|
|
|
'django.contrib.sessions', |
33
|
|
|
'django.contrib.messages', |
34
|
|
|
'django.contrib.staticfiles', |
35
|
|
|
] |
36
|
|
|
|
37
|
|
|
MIDDLEWARE = [ |
38
|
|
|
'django.middleware.security.SecurityMiddleware', |
39
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware', |
40
|
|
|
'django.middleware.common.CommonMiddleware', |
41
|
|
|
'django.middleware.csrf.CsrfViewMiddleware', |
42
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware', |
43
|
|
|
'django.contrib.messages.middleware.MessageMiddleware', |
44
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware', |
45
|
|
|
] |
46
|
|
|
|
47
|
|
|
ROOT_URLCONF = 'mysite.urls' |
48
|
|
|
|
49
|
|
|
TEMPLATES = [ |
50
|
|
|
{ |
51
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates', |
52
|
|
|
'DIRS': [os.path.join(BASE_DIR, 'templates')], |
53
|
|
|
'APP_DIRS': True, |
54
|
|
|
'OPTIONS': { |
55
|
|
|
'context_processors': [ |
56
|
|
|
'django.template.context_processors.debug', |
57
|
|
|
'django.template.context_processors.request', |
58
|
|
|
'django.contrib.auth.context_processors.auth', |
59
|
|
|
'django.contrib.messages.context_processors.messages', |
60
|
|
|
], |
61
|
|
|
}, |
62
|
|
|
}, |
63
|
|
|
] |
64
|
|
|
|
65
|
|
|
WSGI_APPLICATION = 'mysite.wsgi.application' |
66
|
|
|
|
67
|
|
|
# Password validation |
68
|
|
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators |
69
|
|
|
|
70
|
|
|
AUTH_PASSWORD_VALIDATORS = [ |
71
|
|
|
{ |
72
|
|
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', |
73
|
|
|
}, |
74
|
|
|
{ |
75
|
|
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', |
76
|
|
|
}, |
77
|
|
|
{ |
78
|
|
|
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', |
79
|
|
|
}, |
80
|
|
|
{ |
81
|
|
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', |
82
|
|
|
}, |
83
|
|
|
] |
84
|
|
|
|
85
|
|
|
# Internationalization |
86
|
|
|
# https://docs.djangoproject.com/en/1.11/topics/i18n/ |
87
|
|
|
|
88
|
|
|
LANGUAGE_CODE = 'en-us' |
89
|
|
|
|
90
|
|
|
TIME_ZONE = 'Europe/Amsterdam' |
91
|
|
|
|
92
|
|
|
USE_I18N = True |
93
|
|
|
|
94
|
|
|
USE_L10N = True |
95
|
|
|
|
96
|
|
|
USE_TZ = True |
97
|
|
|
|
98
|
|
|
# Static files (CSS, JavaScript, Images) |
99
|
|
|
# https://docs.djangoproject.com/en/dev/howto/static-files/ |
100
|
|
|
|
101
|
|
|
# Place where the static files will end up after collectstatic. |
102
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static') |
103
|
|
|
# Place where static files will be served on your website, http://website.com/STATIC_URL/app/style.css for example. |
104
|
|
|
# In production this will be replaced by the NGINX config file |
105
|
|
|
STATIC_URL = '/static/' |
106
|
|
|
|
107
|
|
|
# A list of folders where Django will search for additional static files, in addition to |
108
|
|
|
# each static folder of each app installed. |
109
|
|
|
STATICFILES_DIRS = [ |
110
|
|
|
] |
111
|
|
|
|
112
|
|
|
# Makes sure Django looks for static files in each static folder in each app |
113
|
|
|
STATICFILES_FINDERS = ( |
114
|
|
|
'django.contrib.staticfiles.finders.FileSystemFinder', |
115
|
|
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
116
|
|
|
) |
117
|
|
|
|
118
|
|
|
|
119
|
|
|
TINYMCE_DEFAULT_CONFIG = { |
120
|
|
|
'theme': 'advanced', |
121
|
|
|
'relative_urls': False, |
122
|
|
|
'width': 800, |
123
|
|
|
'height': 400, |
124
|
|
|
'content_css': '/static/pages/style.css', |
125
|
|
|
'plugins': 'paste', |
126
|
|
|
'paste_as_text': True, |
127
|
|
|
} |
128
|
|
|
|