Merge pull request #10 from rackspace/better_wsgi
checks local_setting.py file before env vars
This commit is contained in:
commit
b50bab98d1
21
settings.py
21
settings.py
@ -1,11 +1,20 @@
|
|||||||
# Django settings for stproject project.
|
# Django settings for StackTach project.
|
||||||
import os
|
import os
|
||||||
|
|
||||||
db_name = os.environ['STACKTACH_DB_NAME']
|
try:
|
||||||
db_host = os.environ.get('STACKTACH_DB_HOST', "")
|
from local_settings import *
|
||||||
db_username = os.environ['STACKTACH_DB_USERNAME']
|
|
||||||
db_password = os.environ['STACKTACH_DB_PASSWORD']
|
db_name = STACKTACH_DB_NAME
|
||||||
install_dir = os.environ['STACKTACH_INSTALL_DIR']
|
db_host = STACKTACH_DB_HOST
|
||||||
|
db_username = STACKTACH_DB_USERNAME
|
||||||
|
db_password = STACKTACH_DB_PASSWORD
|
||||||
|
install_dir = STACKTACH_INSTALL_DIR
|
||||||
|
except ImportError:
|
||||||
|
db_name = os.environ['STACKTACH_DB_NAME']
|
||||||
|
db_host = os.environ.get('STACKTACH_DB_HOST', "")
|
||||||
|
db_username = os.environ['STACKTACH_DB_USERNAME']
|
||||||
|
db_password = os.environ['STACKTACH_DB_PASSWORD']
|
||||||
|
install_dir = os.environ['STACKTACH_INSTALL_DIR']
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
TEMPLATE_DEBUG = DEBUG
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user