__init__.py 743 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.
"""
Thom Wiggers's avatar
Thom Wiggers committed
9
# flake8: noqa
10
11
12
13
14

# Load all default settings because we need to use settings.configure
# for sphinx documentation generation.
from django.conf.global_settings import *

Thom Wiggers's avatar
Thom Wiggers committed
15
import os
16
17

# Load base settings
Thom Wiggers's avatar
Thom Wiggers committed
18
from .settings import *
19
20

# Attempt to load local overrides
Thom Wiggers's avatar
Thom Wiggers committed
21
22
23
24
try:
    from .localsettings import *
except ImportError:
    pass
Thom Wiggers's avatar
Thom Wiggers committed
25

26
27
# Load production settings if DJANGO_PRODUCTION is set
if os.environ.get('DJANGO_PRODUCTION'):  # pragma: nocover
Thom Wiggers's avatar
Thom Wiggers committed
28
    from .production import *
29
30
31

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