Files
@ dd06e881fdb2
Branch filter:
Location: majic-django-templates/project/project_name/settings/testing.py - annotation
dd06e881fdb2
2.1 KiB
text/x-python
MDT-3: Updated general information about Majic Django Templates. Added some development instructions for creating new project templates when new version of Django comes out.
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 | # Testing environment settings for project {{ project_name }}.
#
# This configuration file is used to define settings for the testing
# 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 test environment, but may be
# necessary in some cases.
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. Testing environment should use database configuration
# as similar to production as possible.
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 testing
# environment.
ALLOWED_HOSTS = []
# Local time zone for testing environment.
TIME_ZONE = 'Europe/Stockholm'
|