diff --git a/uffd/__init__.py b/uffd/__init__.py index 4a859d0327d7d745fee1eb6fd2387dbfe5d6d00a..fbe6993c1e5ba01d8f82300ac6ae06e667365af0 100644 --- a/uffd/__init__.py +++ b/uffd/__init__.py @@ -12,6 +12,7 @@ sys.path.append('deps/ldapalchemy') # pylint: disable=wrong-import-position from uffd.database import db, SQLAlchemyJSON +from uffd.ldap import ldap from uffd.template_helper import register_template_helper from uffd.navbar import setup_navbar # pylint: enable=wrong-import-position @@ -53,6 +54,11 @@ def create_app(test_config=None): # pylint: disable=too-many-locals for i in user.bp + selfservice.bp + role.bp + mail.bp + session.bp + csrf.bp + mfa.bp + oauth2.bp + services.bp + signup.bp + invite.bp: app.register_blueprint(i) + @app.shell_context_processor + def push_request_context(): #pylint: disable=unused-variable + app.test_request_context().push() # LDAP ORM requires request context + return {'db': db, 'ldap': ldap} + @app.route("/") def index(): #pylint: disable=unused-variable return redirect(url_for('selfservice.index'))