summaryrefslogtreecommitdiffstats
path: root/accounts/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/__init__.py')
-rw-r--r--accounts/__init__.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/accounts/__init__.py b/accounts/__init__.py
index e6927b0..61a344b 100644
--- a/accounts/__init__.py
+++ b/accounts/__init__.py
@@ -2,7 +2,7 @@
from flask import Flask, g, session
from flask.ext.login import LoginManager
-import account
+from models import Service
from utils import *
from utils.sessions import EncryptedSessionInterface
from utils.login import parse_userid
@@ -17,7 +17,11 @@ app.config.from_object('accounts.default_settings')
app.config.from_envvar('SPLINE_ACCOUNT_WEB_SETTINGS', silent=True)
app.session_interface = EncryptedSessionInterface()
-app.all_services = account.SERVICES #TODO: take that from our json file or so
+app.all_services = list()
+for (name, url) in app.config.get('SERVICES', list()):
+ cn = name.lower()
+ app.all_services.append(Service(cn, name, url))
+
app.user_backend = get_backend(app.config['USER_BACKEND'], app)
app.mail_backend = get_backend(app.config['MAIL_BACKEND'], app)