Source

flask-couchdb / example / templates / display.html

Full commit
<!doctype html>
{#  display.html -- Displays the guestbook entries and a submit form
    (C) 2010 Matthew "LeafStorm" Frazier
    Part of Flask-CouchDB
    Released under the MIT/X11 license, see LICENSE for details
#}
<title>Guestbook</title>

<h1>Guestbook</h1>

<h2>Sign</h2>

<form method=post action="{{ url_for('post') }}">
    <dl>
        <dt><label for=author>Author</label>
        <dd><input type=text name=author>
        
        <dt><label for=message>Message</label>
        <dd><textarea name=message rows=10 cols=40></textarea>
    </dl>
    
    <p><input type=submit value=Submit>
</form>

<h2>Signatures</h2>

<ul>
{%- for signature in page.items %}
    <li><p>{{ signature.message }}
        <p><strong>{{ signature.author }}</strong>
           on {{ signature.time.strftime('%A, %B %d at %I:%M:%S %p') }}
{%- endfor %}
</ul>

<p>
    {% if page.prev %}<a href="{{ url_for('display', start=page.prev) }}">&laquo; Previous</a>{% endif %}
    {% if page.next %}<a href="{{ url_for('display', start=page.next) }}">Next &raquo;</a>{% endif %}