-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprod.sample.py
More file actions
73 lines (59 loc) · 1.49 KB
/
prod.sample.py
File metadata and controls
73 lines (59 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
from tkweb.settings.base import *
# https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
DEBUG = False
TEMPLATES[0]['OPTIONS']['debug'] = False
# Generate using pwgen -sy 50 1
SECRET_KEY = 'ThisIsNotASecret'
ALLOWED_HOSTS = [
'TAAGEKAMMERET.dk',
'www.TAAGEKAMMERET.dk',
]
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'tkweb',
'USER': '',
'PASSWORD': '',
}
}
ADMINS = (
('John Doe', 'webmaster@example.com'),
)
# Media files
MEDIA_ROOT = '/Pictures/tkammer/media/'
# Logging
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'simple': {
'format': '%(levelname)s %(name)s %(message)s'
},
},
'handlers': {
'file': {
'class': 'logging.handlers.WatchedFileHandler',
'filename': os.path.join(BASE_DIR, '../django.log'),
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
},
},
'loggers': {
'django': {
'handlers': ['file', 'mail_admins'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'WARNING'),
},
'tkweb': {
'handlers': ['file', 'mail_admins'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
},
},
}
# Cookies
# -------
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True