diff --git a/example/templates/login.html b/example/templates/login.html deleted file mode 100644 index 231bb56..0000000 --- a/example/templates/login.html +++ /dev/null @@ -1,11 +0,0 @@ -{% include "_messages.html" %} -{% include "_nav.html" %} -
-{{ content }}
diff --git a/flask_security/core.py b/flask_security/core.py index 501c560..64cdc0c 100644 --- a/flask_security/core.py +++ b/flask_security/core.py @@ -256,12 +256,13 @@ class Security(object): template_folder='templates') app.register_blueprint(bp) - app.context_processor(lambda: dict(url_for_security=url_for_security)) - state = self._get_state(app, datastore or self.datastore) app.extensions['security'] = state + app.context_processor(lambda: dict(url_for_security=url_for_security, + security=state)) + return state def _get_state(self, app, datastore): diff --git a/flask_security/templates/security/forgot_password.html b/flask_security/templates/security/forgot_password.html index 27a0d54..be818dc 100644 --- a/flask_security/templates/security/forgot_password.html +++ b/flask_security/templates/security/forgot_password.html @@ -1,6 +1,6 @@ {% from "security/_macros.html" import render_field_with_errors, render_field %} {% include "security/_messages.html" %} -
+ {% if security.recoverable %}
+ Forgot password
+ {% endif %}
+ {% if security.confirmabled %}
+ Confirm account
+ {% endif %}
+