Use automatic template context rather than passing the path through
Saves me having to push a bunch of common stuff through, which just makes sense
This commit is contained in:
parent
31d810b65d
commit
e1f39bb852
|
@ -14,7 +14,7 @@
|
|||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="{{ 'active' if path == '/accounts' else ''}}"><a href="/accounts">Accounts<span class="sr-only">(current)</span></a></li>
|
||||
<li class="{{ 'active' if request.path == '/accounts/' else ''}}"><a href="/accounts">Accounts<span class="sr-only">(current)</span></a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,4 +4,4 @@ blueprint = flask.Blueprint('index', __name__)
|
|||
|
||||
@blueprint.route('/', methods=['GET'])
|
||||
def index():
|
||||
return flask.render_template('index.html', path='/')
|
||||
return flask.render_template('index.html')
|
||||
|
|
Loading…
Reference in New Issue