2 Sample production-ready settings for patchwork project.
4 Most of these are commented out as they will be installation dependent.
7 http://www.revsys.com/blog/2014/nov/21/recommended-django-project-layout/
10 from __future__ import absolute_import
16 from .base import * # noqa
21 # https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings
26 # You'll need to replace this to a random string. The following python code can
27 # be used to generate a secret key:
29 # import string, random
30 # chars = string.letters + string.digits + string.punctuation
31 # print repr("".join([random.choice(chars) for i in range(0,50)]))
35 # Replace this with your own details
37 EMAIL_HOST = os.getenv('EMAIL_HOST', 'localhost')
38 EMAIL_PORT = os.getenv('EMAIL_PORT', 25)
39 EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER', '')
40 # password goes in pass.py
43 DEFAULT_FROM_EMAIL = 'Patchwork <patchwork@patchwork.quagga.net>'
44 SERVER_EMAIL = DEFAULT_FROM_EMAIL
45 NOTIFICATION_FROM_EMAIL = DEFAULT_FROM_EMAIL
48 ('Paul Jakma', 'paul@quagga.net'),
53 # If you're using a postgres database, connecting over a local unix-domain
54 # socket, then the following setting should work for you. Otherwise,
55 # see https://docs.djangoproject.com/en/1.8/ref/settings/#databases
57 # password goes in pass.py
60 'ENGINE': 'django.db.backends.mysql',
61 'NAME': os.environ.get('DATABASE_NAME', 'patchwork'),
62 'USER': os.environ.get('DATABASE_USER', 'patchwork'),
69 # Static files settings
70 # https://docs.djangoproject.com/en/1.8/ref/settings/#static-files
71 # https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/#manifeststaticfilesstorage
74 STATIC_ROOT = os.environ.get('STATIC_ROOT', '/home/patchwork/htdocs/static')
77 if django.VERSION >= (1, 7):
78 STATICFILES_STORAGE = \
79 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
85 ALLOWED_HOSTS=['patchwork.quagga.net','testpw.quagga.net', 'http', 'http.quagga.net', '*.quagga.net']
87 with open("patchwork/settings/pass.py") as f:
88 code = compile(f.read(), "patchwork/settings/pass.py", 'exec')