forked from raccoongang/edx-proctoring
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsettings.py
106 lines (88 loc) · 2.51 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
"""
Django settings file for local development purposes
"""
import sys
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(__file__)
DEBUG = True
TEST_MODE = True
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
TEST_ROOT = "tests"
TRANSACTIONS_MANAGED = {}
USE_TZ = True
TIME_ZONE = {}
SECRET_KEY = 'SHHHHHH'
PLATFORM_NAME = 'Open edX'
FEATURES = {}
HTTPS = 'off'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'edx_proctoring.db'),
},
}
SITE_ID = 1
SITE_NAME = 'localhost:8000'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'edx_proctoring',
'django_nose',
'south',
)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_CLASSES': (
'rest_framework.throttling.UserRateThrottle',
),
}
if not TEST_MODE:
# we don't want to throttle unit tests
REST_FRAMEWORK.update({
'DEFAULT_THROTTLE_RATES': {
'user': '10/sec',
}
})
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
)
ROOT_URLCONF = 'edx_proctoring.urls'
COURSE_ID_REGEX = r'[^/+]+(/|\+)[^/+]+(/|\+)[^/]+'
COURSE_ID_PATTERN = r'(?P<course_id>%s)' % COURSE_ID_REGEX
PROCTORING_SETTINGS = {
"ALLOW_CALLBACK_SIMULATION": False,
"CLIENT_TIMEOUT": 30,
"DEFAULT_REVIEW_POLICY": "Closed Book",
"REQUIRE_FAILURE_SECOND_REVIEWS": False
}
PROCTORING_BACKEND_PROVIDERS = {
"TEST": {
"class": "edx_proctoring.backends.tests.test_backend.TestBackendProvider",
"options": {},
"settings": {
"LINK_URLS": {
"contact_us": "{add link here}",
"faq": "{add link here}",
"online_proctoring_rules": "{add link here}",
"tech_requirements": "{add link here}"
}
}
}
}
DEFAULT_FROM_EMAIL = '[email protected]'
CONTACT_EMAIL = '[email protected]'
import logging
south_logger = logging.getLogger('south')
south_logger.setLevel(logging.INFO)