blob: ae123c2c5001660817a5c5703ff8ea2c058acce4 [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://10.0.10.13:7070/api/v0.1"
20
21# suggest authentication based on the available schema
22AUTH_PROVIDER = "providers.CustomProvider"
23BABEL_DEFAULT_LOCALE = 'de'
24
25LANGUAGES = {
26 'en': 'English',
27 'de': 'Deutsch'
28}
29
30
31class URIBuilder(object):
32 def __init__(self, url=API_SERVER):
33 self.base = url
34 self.path = []
35
36 def addPath(self, path=None):
37 if path:
38 self.path.append(path)
39 return self
40
41 def build(self):
42 end = self.base
43 for p in self.path:
44 if end.endswith("/"):
45 end += p
46 else:
47 end += "/" + p
48 return end