Files
@ ab6de89ec914
Branch filter:
Location: django-majic-template/project/project_name/settings/production.py - annotation
ab6de89ec914
1.9 KiB
text/x-python
DMT-1: Created separate configuration file for the production environment. Pulled-out a number of settings outside of base config into production config. Pulled out the credentials settings into separate file.
ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 ab6de89ec914 | # Production site settings for {{ project_name }} project.
#
# This configuration file is used to define settins for the production site.
#
# Import the exception for signalling invalid configuration. No other
# Django-specific definitions should be imported here.
from django.core.exceptions import ImproperlyConfigured
# Import the base settings.
from .base import *
# Import the credentials.
try:
from .credentials import DATABASE_PASSWORDS
except ImportError:
raise ImproperlyConfigured("Please configure the DATABASE_PASSWORDS in credentials.py.")
try:
from .credentials import SECRET_KEY
except ImportError:
raise ImproperlyConfigured("Please configure the SECRET_KEY in credentials.py.")
# Disable Debug for production site.
DEBUG = False
TEMPLATE_DEBUG = DEBUG
# Set-up the site administrators.
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
# Set-up the database settings.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': '',
'PASSWORD': DATABASE_PASSWORDS['default'],
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '', # Set to empty string for default.
}
}
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'Europe/Stockholm'
|