-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathsettings.py
45 lines (37 loc) · 929 Bytes
/
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
38
39
40
41
42
43
44
45
import os
BASE_DIR = os.path.dirname(__file__)
SECRET_KEY = 'test'
INSTALL_DIR = '/usr/local/altschool/dynamic-rest/'
STATIC_URL = '/static/'
STATIC_ROOT = INSTALL_DIR + 'www/static'
DEBUG = True
USE_TZ = False
DATABASES = {}
if os.environ.get('DATABASE_URL'):
# remote database
import dj_database_url
DATABASES['default'] = dj_database_url.config()
else:
# local sqlite database file
DATABASES['default'] = {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.abspath('db.sqlite3'),
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': ''
}
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.staticfiles',
'django.contrib.contenttypes',
'django.contrib.auth',
'django.contrib.sites',
'dynamic_rest',
'rest_framework',
'benchmarks',
)
ROOT_URLCONF = 'benchmarks.urls'
DYNAMIC_REST = {
'ENABLE_LINKS': False
}