__init__.py 903 Bytes
Newer Older
1
2
3
4
5
6
7
8
"""
Settings module

This file controls what settings are loaded.

Using environment variables you can control the loading of various
overrides.
"""
9
import os
10
11
12

# Load all default settings because we need to use settings.configure
# for sphinx documentation generation.
13
from django.conf.global_settings import *  # pylint: disable=wildcard-import
14

15
16

# Load base settings
17
from .settings import *  # pylint: disable=wildcard-import
18
19

# Attempt to load local overrides
Thom Wiggers's avatar
Thom Wiggers committed
20
try:
21
    from .localsettings import *  # pylint: disable=wildcard-import
Thom Wiggers's avatar
Thom Wiggers committed
22
23
except ImportError:
    pass
Thom Wiggers's avatar
Thom Wiggers committed
24

25
26
# Load production settings if DJANGO_PRODUCTION is set
if os.environ.get('DJANGO_PRODUCTION'):  # pragma: nocover
27
    from .production import *  # pylint: disable=wildcard-import
28
29
30

# Load testing settings if GITLAB_CI is set
if os.environ.get('GITLAB_CI'):  # pragma: nocover
31
    from .testing import *  # pylint: disable=wildcard-import