-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathproduction.example.py
More file actions
61 lines (47 loc) · 1.57 KB
/
production.example.py
File metadata and controls
61 lines (47 loc) · 1.57 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
"""
Sample production-ready settings for patchwork project.
Most of these are commented out as they will be installation dependent.
Design based on:
http://www.revsys.com/blog/2014/nov/21/recommended-django-project-layout/
"""
import os
from .base import * # noqa
#
# Core settings
# https://docs.djangoproject.com/en/2.2/ref/settings/#core-settings
#
# Security
#
# You'll need to replace this to a random string. The following python code can
# be used to generate a secret key:
#
# import string
# import secrets
#
# chars = string.ascii_letters + string.digits + string.punctuation
# print("".join([secrets.choice(chars) for i in range(50)]))
SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
# Email
#
# Replace this with your own details
EMAIL_HOST = os.getenv('EMAIL_HOST', 'localhost')
EMAIL_PORT = os.getenv('EMAIL_PORT', 25)
EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER', '')
EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD', '')
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.example.com>'
SERVER_EMAIL = DEFAULT_FROM_EMAIL
NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
ADMINS = (
# Add administrator contact details in the form:
# ('Jeremy Kerr', 'jk@ozlabs.org'),
)
#
# Static files settings
# https://docs.djangoproject.com/en/2.2/ref/settings/#static-files
# https://docs.djangoproject.com/en/2.2/ref/contrib/staticfiles/#manifeststaticfilesstorage
#
STATIC_ROOT = os.environ.get('STATIC_ROOT', '/srv/patchwork/htdocs/static')
STATICFILES_STORAGE = (
'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
)