mirror of
https://github.com/wassname/flask-security.git
synced 2026-08-18 12:00:35 +08:00
Refactor templates and added url_for_security utility. Can also configure the blueprint name.
This commit is contained in:
@@ -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,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,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,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/>
|
||||
|
||||
Reference in New Issue
Block a user