CSS summary
“
body{font-family: sans-serif;text-align: center;}table{border-collapse: collapse;margin: auto;}th, td{border: 1 px solid black;padding: 5px;} |
|---|
# template (raw)<!DOCTYPE html><html><head><title>Todo</title><link rel="stylesheet" type="text/css"href="{{ url_for('static', filename='styles.css') }}"></head><body><!-- form or table here --></body></html> |
# template (table)<table><tr><th>Column header 1</th><th>Column header 2</th></tr>{% if items|length > 0 %}{% for item in items %}<tr><td>{{ item.name }}</td><td><a href="{{ url_for('edit', id=item.id) }}">Edit</a> <a href="{{ url_for('delete') }}">Delete</a></td></tr>{% endfor %}{%else%}<tr><td colspan="2">No Items</td></tr>{%endif%}</table> |
# template (form) (POST)<form action="{{ url_for('edit') }}" method="POST"><!-- hidden input --><input type="hidden" value="{{id}}" name="id" id="id"><!-- label and textbox --><p><label for="item" >todo Item</label><input type="text" value="{{item}}" name="item" id="item"></p><!-- submit button --><p><input type="submit" name="action" value="Update"></p></form> |
# template (form) (GET)<form action="{{ url_for('index') }}" method="GET"><p><select name="category" id="category">{% for cat in categories %}<option value="{{cat[0]}}">{{cat[1]}}</option>{% endfor %}</select></p><p><input type="submit" name="action" value="Submit"></p></form> |