-
Notifications
You must be signed in to change notification settings - Fork 8
/
local_settings.py
38 lines (34 loc) · 1.09 KB
/
local_settings.py
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
# coding: utf-8
""" Basic configuration for running tests and generating documentation.
Because Django apps are so tied to Django, it is necessary to configure
Django's settings module before tests can be run or documentation can
be successfully generated by Sphinx.
"""
import os
from django.conf import settings, global_settings
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
if not settings.configured and not os.environ.get('DJANGO_SETTINGS_MODULE'):
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
},
},
INSTALLED_APPS=[
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'djoauth2',
'south',
],
TEMPLATE_DIRS=(
os.path.join(SITE_ROOT, 'djoauth2/tests/templates'),
),
ROOT_URLCONF='djoauth2.tests.urls',
FIXTURE_DIRS=(
os.path.join(SITE_ROOT, 'djoauth2/tests/fixtures'),
),
DEBUG=False,
)