Skip to content

Commit

Permalink
Minor template fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Grau committed Aug 18, 2014
1 parent 2e9de15 commit ad19082
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
22 changes: 13 additions & 9 deletions templates/_nav.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<nav>
{% if security.registerable or security.recoverable or security.confirmabled %}
<ul class="nav nav-account">
<li><a href="{{ url_for_security('login') }}">Login</a></li>
{% if security.registerable %}
<li><a href="{{ url_for_security('register') }}">Register</a></li>
{% endif %}
{% if security.recoverable %}
<li><a href="{{ url_for_security('forgot_password') }}">Forgot password</a></li>
{% endif %}
{% if security.confirmable %}
<li><a href="{{ url_for_security('send_confirmation') }}">Confirm account</a></li>
{% if current_user.is_authenticated() %}
<li><a href="{{ url_for_security('logout') }}">Logout</a></li>
{% else %}
<li><a href="{{ url_for_security('login') }}">Login</a></li>
{% if security.registerable %}
<li><a href="{{ url_for_security('register') }}">Register</a></li>
{% endif %}
{% if security.recoverable %}
<li><a href="{{ url_for_security('forgot_password') }}">Forgot password</a></li>
{% endif %}
{% if security.confirmable %}
<li><a href="{{ url_for_security('send_confirmation') }}">Confirm account</a></li>
{% endif %}
{% endif %}
</ul>
{% endif %}
Expand Down
2 changes: 0 additions & 2 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
<body>
{% include "_nav.html" %}

{{security.current_user}}

<section class="content">
{% block content %}{% endblock %}
</section>
Expand Down
4 changes: 0 additions & 4 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@ def setUp(self):
app.config['TESTING'] = True
app.config['DEBUG'] = True
self.client = app.test_client()
self._ctx = app.test_request_context()
self._ctx.push()

with app.app_context():
init_app()
user_datastore.create_user(email='test', password='test')
db.session.commit()

def tearDown(self):
if self._ctx is not None:
self._ctx.pop()
with app.app_context():
db.session.remove()
db.drop_all()
Expand Down

0 comments on commit ad19082

Please sign in to comment.