July 2018
Intermediate to advanced
324 pages
8h 14m
English
A lot of work needs to be done to accomplish the todo workflow. We defined the templates/todo/list.html template to display the todo form and a list of todo records. In a previous section, we described how we rendered and passed the context data.
The following is the code snippet for the todo list template.
File—templates/todo/list.html:
{% extends "base.html" %}{% block js %} <script src="{{url_for('static', filename='todo/list.js')}}"></script>{% endblock %}{% block body %}<div class="container align-middle mx-auto" style="width:30%; margin-top:5%"> <div class="card mb-3"> <div class="card-header" align="center"><h3>todo's</h3></div> <div class="card-body"> <form method="post" class="form-inline"> {{ form.hidden_tag() }} {% if ...Read now
Unlock full access