#########################
# settings.py
#
# This is a Django settings file with debug set to False, and any sensitive
# variables set to empty strings.
# It can be checked in to version control or made public without fear, since
# the critical variables are loaded from a different file.

# This should always be False in production
TEMPLATE_DEBUG = DEBUG = False

# Exposing database details is a security hole, so leave them blank here.
DATABASE_ENGINE = ''
DATABASE_NAME = ''
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
SECRET_KEY = ''

# Fill in all other, less sensitive settings as usual.
SITE_ID = 1
TIME_ZONE = 'US/Mountain'
# And so on...

# Then load those sensitive settings from a local file with tight
# filesystem permissions.
from os.path import expanduser
execfile(expanduser('~/.django-mysite-settings'))



#########################
# .django-mysite-settings
#
# Note: this is intended to be a separate file from the above code.
# This file should *not* be in version control!
#
# Ensure this file is read-only and accessible only to you and/or the
# webserver process that will need to read it.

# Set database details and credentials
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'mydatabase'
DATABASE_USER = 'myuser'
DATABASE_PASSWORD = 'mypassword'
SECRET_KEY = ')lmy#t$-j+)=c-s6&^xe%!=anku0jmj^d$%pd0_wbgrq-v$--z'

# Maybe turn debugging on for local testing
TEMPLATE_DEBUG = DEBUG = True

# And possibly also override some debug-related settings
CACHE_BACKEND = 'dummy:///'
TEMPLATE_DIRS = (('/home/ericidle/somewhere/templates'),)