-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
56 lines (45 loc) · 2.01 KB
/
settings.py
File metadata and controls
56 lines (45 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Initialize App Engine and import the default settings (DB backend, etc.).
# If you want to use a different backend you have to remove all occurences
# of "djangoappengine" from this file.
from djangoappengine.settings_base import *
#import os
# Activate django-dbindexer for the default database
DATABASES['native'] = DATABASES['default']
DATABASES['default'] = {'ENGINE': 'dbindexer', 'TARGET': 'native', 'DEV_APPSERVER_OPTIONS': {'use_sqlite': True}}
AUTOLOAD_SITECONF = 'indexes'
SECRET_KEY = '00000000-0000-0000-0000-000000000000'
try:
import secrets # contains things that should not go on git, like our production secret key
SECRET_KEY = secrets.secret_key
except ImportError:
# In the absence of secrets.py, assume testing environment and use the default dummy value
pass
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'djangotoolbox',
'autoload',
'dbindexer',
'quartermaster',
# djangoappengine should come last, so it can override a few manage.py commands
'djangoappengine',
)
MIDDLEWARE_CLASSES = (
# This loads the index definitions, so it has to come first
'autoload.middleware.AutoloadMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'quartermaster.user.template_vars', # Insert the username and login/logout vars into templates
)
# This test runner captures stdout and associates tracebacks with their
# corresponding output. Helps a lot with print-debugging.
TEST_RUNNER = 'djangotoolbox.test.CapturingTestSuiteRunner'
# when our app is registered as an INSTALLED_APPS above, these are unnecessary:
#TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'quartermaster/templates'),)
#FIXTURE_DIRS = (os.path.join(os.path.dirname(__file__), 'quartermaster/fixtures/'),)
# Needed for some reason, points to urls.py
ROOT_URLCONF = 'urls'