diff options
author | Stephen Finucane <stephenfinucane@hotmail.com> | 2015-04-07 22:20:54 +0100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2015-05-03 13:46:52 +0800 |
commit | ae639a6a6aea26b0648a0e2d2fd4bccd7a41c791 (patch) | |
tree | eee1eccf8d20895e25cf5c4946071a9e7ce8f5e9 /apps/patchwork/settings/prod.py | |
parent | d4a2c1f8792f52fec0c881ab38c91635840a50c0 (diff) | |
download | patchwork-ae639a6a6aea26b0648a0e2d2fd4bccd7a41c791.tar.bz2 patchwork-ae639a6a6aea26b0648a0e2d2fd4bccd7a41c791.tar.xz |
settings: Split 'settings.py' into multiple files
This will make testing/developing a little easier and prevent people
deploying insecure instances.
This also adds references to Django documentation in said files (for
Django novices) and restructures the files to group them together
logically.
This allows us to remove the settings file used for tests.
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/settings/prod.py')
-rw-r--r-- | apps/patchwork/settings/prod.py | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/apps/patchwork/settings/prod.py b/apps/patchwork/settings/prod.py new file mode 100644 index 0000000..d71f3df --- /dev/null +++ b/apps/patchwork/settings/prod.py @@ -0,0 +1,62 @@ +""" +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/ +""" + +from base import * + +# +# Core settings +# https://docs.djangoproject.com/en/1.6/ref/settings/#core-settings +# + +# Security + +# SECRET_KEY = '00000000000000000000000000000000000000000000000000' + +# Email + +# ADMINS = ( +# ('Jeremy Kerr', 'jk@ozlabs.org'), +# ) + +# Database + +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.postgresql_psycopg2', +# 'NAME': 'patchwork', +# }, +# } + +# File Uploads + +# MEDIA_ROOT = os.path.join( +# ROOT_DIR, 'lib', 'python', 'django', 'contrib', 'admin', 'media') + + +# +# Static files settings +# https://docs.djangoproject.com/en/1.6/ref/settings/#static-files +# + +# STATIC_ROOT = '/srv/patchwork/htdocs' + + +# +# Custom user overrides (for legacy) +# + +try: + from local_settings import * +except ImportError, ex: + import sys + sys.stderr.write(\ + ("settings.py: error importing local settings file:\n" + \ + "\t%s\n" + \ + "Do you have a local_settings.py module?\n") % str(ex)) + raise |