flask 0.11 compatibility

This commit is contained in:
Stephane Martin 2016-09-05 23:19:28 +02:00
parent d643b97875
commit 1531eac9da
2 changed files with 9 additions and 9 deletions

View file

@ -58,7 +58,7 @@
</div>
</form>
</li>
{% if current_user.is_authenticated() %}
{% if current_user.is_authenticated %}
<li class="dropdown user-avatar">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span>
@ -113,7 +113,7 @@
{% endfor %}
var User = {};
User.is_authenticated = {{ current_user.is_authenticated()|tojson }};
User.is_authenticated = {{ current_user.is_authenticated|tojson }};
{% for attr in ['username', 'email'] %}
User.{{ attr }} = {{ current_user[attr]|tojson }};
{% endfor %}