1
|
from django.conf import settings
|
2
|
from rest_framework.settings import api_settings
|
3
|
|
4
|
LANGUAGE_CODE = 'en'
|
5
|
|
6
|
try:
|
7
|
import hobo
|
8
|
except(ImportError,):
|
9
|
hobo = None
|
10
|
|
11
|
HOBO = hobo
|
12
|
|
13
|
MELLON_IDENTITY_PROVIDERS = [
|
14
|
{
|
15
|
'METADATA_URL': 'http://testsever.org/idp/saml2/metadata'
|
16
|
}
|
17
|
]
|
18
|
|
19
|
SITE_APP = 'mandayejs.applications.Test'
|
20
|
SECRET_KEY = 'od5cei4aeveel8dui4lei2ou9ahsei2A'
|
21
|
|
22
|
KNOWN_SERVICES = {
|
23
|
"service":{
|
24
|
"testserver": {
|
25
|
"title": "testserver",
|
26
|
"orig": "testserver",
|
27
|
"url": "http://testserver",
|
28
|
"secret": "od5cei4aeveel8dui4lei2ou9ahsei2A",
|
29
|
"verif_orig": "testserver"
|
30
|
}
|
31
|
}
|
32
|
}
|
33
|
|
34
|
HOBO_ANONYMOUS_SERVICE_USER_CLASS = 'hobo.rest_authentication.AnonymousAdminServiceUser'
|
35
|
|
36
|
# REST FRAMEWORK SETTINGS
|
37
|
if hobo:
|
38
|
AUTHENTICATION_CLASSES = (
|
39
|
'rest_framework.authentication.SessionAuthentication',
|
40
|
'rest_framework.authentication.BasicAuthentication',
|
41
|
'hobo.rest_authentication.PublikAuthentication',
|
42
|
)
|
43
|
else:
|
44
|
AUTHENTICATION_CLASSES = (
|
45
|
'rest_framework.authentication.SessionAuthentication',
|
46
|
'rest_framework.authentication.BasicAuthentication',
|
47
|
)
|
48
|
|
49
|
api_settings.user_settings.update({
|
50
|
'DEFAULT_AUTHENTICATION_CLASSES' : AUTHENTICATION_CLASSES,
|
51
|
})
|
52
|
|
53
|
|
54
|
PHANTOM_JS_TIMEOUT = 0.25
|