SHARE
TWEET

show_entries.html

a guest Apr 28th, 2012 49 Never
  1. {% extends "layout.html" %}
  2. {% block body %}
  3.   {% if session.logged_in %}
  4.     <form action="{{ url_for('add_entry') }}" method="post" class="add-entry">
  5.       <dl>
  6.         <dt>Title:
  7.         <dd><input type="text" size="30" name="title">
  8.         <dt>Text:
  9.         <dd><textarea name="text" rows="5" cols="40"></textarea>
  10.         <dd><input type="submit" value="Share">
  11.       </dl>
  12.     </form>
  13.   {% endif %}
  14.   <ul class="entries">
  15.   {% for entry in entries %}
  16.     <li><h2>{{ entry.title }}</h2>{{ entry.text|safe }}
  17.   {% else %}
  18.     <li><em>Unbelievable.  No entries here so far</em>
  19.   {% endfor %}
  20.   </ul>
  21. {% endblock %}
RAW Paste Data
Top