messing around with flask tutorial

base.html 776B

12345678910111213141516171819202122232425
  1. <!doctype html>
  2. <title>{% block title %}{% endblock %} - Flaskr</title>
  3. <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
  4. <nav>
  5. <h1>Flaskr</h1>
  6. <ul>
  7. {% if g.user %}
  8. <li><span>{{ g.user['username'] }}</span>
  9. <li><a href="{{ url_for('auth.logout') }}">Log Out</a>
  10. {% else %}
  11. <li><a href="{{ url_for('auth.register') }}">Register</a>
  12. <li><a href="{{ url_for('auth.login') }}">Log In</a>
  13. {% endif %}
  14. </ul>
  15. </nav>
  16. <section class="content">
  17. <header>
  18. {% block header %}{% endblock %}
  19. </header>
  20. {% for message in get_flashed_messages() %}
  21. <div class="flash">{{ message }}</div>
  22. {% endfor %}
  23. {% block content %}{% endblock %}
  24. </section>