Files
@ ab300f858903
Branch filter:
Location: majic-django-templates/project/project_name/settings/production.py - annotation
ab300f858903
2.2 KiB
text/x-python
MDT-1: Use better pathfinding for development environment when locating the sqlite3 database. Set a saner default for redirect after login (redirect to 'index' view, whatever it may be).
5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc 5723046a01dc | # Production environment settings for project {{ project_name }}.
#
# This configuration file is used to define settins for the production
# environment.
#
# Import the exception for signaling 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.")
# Debugging should normally be disabled in production environment, but may be
# necessary in case of serious issues that cannot be reproduced in test
# environment.
DEBUG = False
for template_config in TEMPLATES:
template_config['OPTIONS']['debug']=False
# Site administrators and managers.
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
# Database configuration. Avoid using sqlite3 for production environments.
DATABASES = {
'default': {
# Database engine to use. Set it to 'postgresql_psycopg2', 'mysql',
# 'sqlite3' or 'oracle' (keep the django.db.backends prefix).
'ENGINE': 'django.db.backends.',
# Name of database, or path to database file if using sqlite3.
'NAME': '',
# Username for logging-in into database server. Not required for
# sqlite3.
'USER': '',
# Password for logging-in into database server. Should be read from
# credentials.py.
'PASSWORD': DATABASE_PASSWORDS['default'],
# IP or resolvable name of the database server.
'HOST': '127.0.0.1',
# Port on which the database server accepts incoming connections. If not
# specified, engine-specific port is set automatically.
'PORT': '',
}
}
# Hosts that are valid for accessing this site. Must be set for production
# environment.
ALLOWED_HOSTS = []
# Local time zone for production environment.
TIME_ZONE = 'Europe/Stockholm'
|