Refactor templates and added url_for_security utility. Can also configure the blueprint name.

This commit is contained in:
Matt Wright
2012-08-16 13:41:13 -04:00
parent ac674ecd86
commit 2fcfb80e8e
23 changed files with 83 additions and 61 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
{% endif -%}
<li>
{%- if current_user.is_authenticated() -%}
<a href="{{ url_for('flask_security.logout') }}">Log out</a>
<a href="{{ url_for('security.logout') }}">Log out</a>
{%- else -%}
<a href="{{ url_for('login') }}">Log in</a>
{%- endif -%}
+1 -1
View File
@@ -1,6 +1,6 @@
{% include "_messages.html" %}
{% include "_nav.html" %}
<form action="{{ url_for('flask_security.authenticate') }}" method="POST" name="login_form">
<form action="{{ url_for_security('authenticate') }}" method="POST" name="login_form">
{{ form.hidden_tag() }}
{{ form.email.label }} {{ form.email }}<br/>
{{ form.password.label }} {{ form.password }}<br/>
+1 -1
View File
@@ -1,6 +1,6 @@
{% include "_messages.html" %}
{% include "_nav.html" %}
<form action="{{ url_for('flask_security.send_login') }}" method="POST" name="login_form">
<form action="{{ url_for_security('send_login') }}" method="POST" name="login_form">
{{ form.hidden_tag() }}
{{ form.email.label }} {{ form.email }}<br/>
{{ form.next }}
+1 -1
View File
@@ -1,7 +1,7 @@
{% include "_messages.html" %}
{% include "_nav.html" %}
<h1>Register</h1>
<form action="{{ url_for('flask_security.register') }}" method="POST" name="register_form">
<form action="{{ url_for_security('register') }}" method="POST" name="register_form">
{{ register_user_form.hidden_tag() }}
{{ register_user_form.email.label }} {{ register_user_form.email }}<br/>
{{ register_user_form.password.label }} {{ register_user_form.password }}<br/>