forked from orbit-oss/flask
Added mini blogging application as Flask example.
This should become the tutorial.
This commit is contained in:
parent
2d9bb69272
commit
c33675f025
7 changed files with 241 additions and 0 deletions
17
examples/flaskr/templates/layout.html
Normal file
17
examples/flaskr/templates/layout.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<title>Flaskr</title>
|
||||
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
|
||||
<div class=page>
|
||||
<h1>Flaskr</h1>
|
||||
<div class=metanav>
|
||||
{% if not g.logged_in %}
|
||||
<a href="{{ url_for('login') }}">log in</a>
|
||||
{% else %}
|
||||
<a href="{{ url_for('logout') }}">log out</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% for message in get_flashed_messages() %}
|
||||
<div class=flash>{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue