settings: ne pas définir SITE_ID
[auf_framonde.git] / project / settings.py
1 import sys
2 import glob
3 import types
4
5 from os.path import abspath, dirname, join
6
7 from django.conf.global_settings import * # NOQA
8
9 PROJECT_DIR = abspath(dirname(__file__))
10
11 conffiles = glob.glob(join(PROJECT_DIR, 'settings', '*.py'))
12 conffiles.sort()
13
14 for f in conffiles:
15 exec(open(abspath(f)).read())
16
17 # from https://github.com/2general/django-split-settings/blob/master/split_settings/tools.py
18 # add dummy modules to sys.modules to make runserver autoreload work with
19 # settings components
20 modulename = '_settings.%s' % f
21 module = types.ModuleType(modulename)
22 module.__file__ = f
23 sys.modules[modulename] = module
24
25 try:
26 from conf import *
27 except ImportError:
28 pass