lundi 30 mars 2015

How to delete records of checked tasks?

I am making a python todo list application with Flask. I am not aware of how to delete the records of tasks checked in the database. I am using sqlite3.



{% extends 'base.html' %} {% block heading %} Todo List {% endblock %} {% block content %}
<div class="tasks">
<form action="/deletesel" method="post">
<input type="submit" value="Delete Selected">
<br>
<br> {% for todo in todos %}
<label class="task">
<input type="checkbox" class="checkTask">{{ todo.todo }}</label>
<br> {% endfor %}{% with messages = get_flashed_messages() %} {% if messages %} {% for message in messages %} {{ message }} {% endfor %} {% endif %} {% endwith %}
</form>
</div>
<div>
<form method="post">
<input type="text" name="newTask">
<input type="submit" value="Add"> </form>
</div>{% endblock %}




Aucun commentaire:

Enregistrer un commentaire