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

This file controls what settings are loaded.

Using environment variables you can control the loading of various
overrides.
"""

Thom Wiggers's avatar
Thom Wiggers committed
10
# flake8: noqa
Thom Wiggers's avatar
Thom Wiggers committed
11
import os
12
13

# Load base settings
Thom Wiggers's avatar
Thom Wiggers committed
14
from .settings import *
15
16

# Attempt to load local overrides
Thom Wiggers's avatar
Thom Wiggers committed
17
18
19
20
try:
    from .localsettings import *
except ImportError:
    pass
Thom Wiggers's avatar
Thom Wiggers committed
21

22
23
# Load production settings if DJANGO_PRODUCTION is set
if os.environ.get('DJANGO_PRODUCTION'):  # pragma: nocover
Thom Wiggers's avatar
Thom Wiggers committed
24
    from .production import *
25
26
27

# Load testing settings if GITLAB_CI is set
if os.environ.get('GITLAB_CI'):  # pragma: nocover
Wietse Kuipers's avatar
Wietse Kuipers committed
28
    from .testing import *