blob: 36e8c91772b71c5ac850846db2646fe25a145eb5 [file] [log] [blame]
Akronca9bd982016-12-06 16:59:57 +01001__author__ = 'hanl'
2
3DEBUG = True
4
5QUERY_LANGUAGES = {"poliqarp": "Poliqarp", "cosmas2": "Cosmas 2", "annis": "ANNIS",
6 "cql": "CQL"}
7
8WTF_CSRF_ENABLED = True
9SECRET_KEY = "nHim5JB-YqkX7sS55jayGBnga8WmqgpkzieGe8UhojE"
10REMEMBER_COOKIE_NAME = "rememberMe"
11
12# RECAPTCHA_PUBLIC_KEY = "YOUR PUBLIC KEY" # https://www.google.com/recaptcha
13# RECAPTCHA_PRIVATE_KEY = "YOUR PRIVATE KEY" # https://www.google.com/recaptcha
14
15# Oauth client data
16OAUTH2_CLIENT_ID = "fCBbQkA3ZDBhMzc2Nw=="
17OAUTH2_CLIENT_SECRET = "f58c361f7e8e07a05133322f6af6727440edcab7dbc02a49508c0168bd18c7ed"
18OPENID_CONNECT_SCOPES = "openid profile"
19API_SERVER = "http://localhost:7070/api/v0.1"
20
21# suggest authentication based on the available schema
22AUTH_PROVIDER = "providers.CustomProvider"
23
24BABEL_DEFAULT_LOCALE = 'de'
25
26LANGUAGES = {
27 'en': 'English',
28 'de': 'Deutsch'
29}
30
31ADMINS = {'OAuth2Provider': ('access_token', ['auth_token']),
32 'CustomProvider': ('username', ['MichaelHanl', 'korap'])}
33
34
35# email settings
36# MAIL_SERVER : default 'localhost'
37#MAIL_PORT : default 25
38#MAIL_USE_TLS : default False
39#MAIL_USE_SSL : default False
40#MAIL_USERNAME : default None
41#MAIL_PASSWORD : default None
42DEFAULT_MAIL_SENDER = "korap@ids-mannheim.de"
43
44
45class URIBuilder(object):
46 def __init__(self, url=API_SERVER):
47 self.base = url
48 self.path = []
49
50 def addPath(self, path=None):
51 if path:
52 self.path.append(path)
53 return self
54
55 def build(self):
56 end = self.base
57 if not end:
58 raise ValueError("no base URL set!")
59 for p in self.path:
60 if end.endswith("/"):
61 end += p
62 else:
63 end += "/" + p
64 return end