Skip to content
/ todo Public

A todo application, to learn Python (with Flask) and Javascript (Backbone.js)

Notifications You must be signed in to change notification settings

knyl/todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todilo

A small todo-application written in Python/Flask and Javascript/Backbone.js

Lets you add todos, edit them and reorder them.

Setup

Install the required pip packages:

pip install -r requirements.txt

To create the database, run:

> sqlite3 todilo.db < schema.sql

Then, start the application with:

python todilo.py

Backend API

All data posted to, or retrieved from the API must be valid JSON.

Todo object

  • id - unique identifier
  • title - title of the todo
  • prio - priority of the todo
  • done - whether the todo is done or not

Resources

  • GET /todos List the current todos.

    • Response A collection with Todo objects.
  • GET /todos/<todo_id> Retrieve a specific todo.

    • Response The requested Todo object, or 404 Not Found, if it doesn't exist.
  • POST /todos Add a new todo.

    • Input A Todo object.
    • Response 201 Created, if the data is valid.
  • PUT /todos/<todo_id> Update a todo.

    • Input A Todo object.
    • Response 200 OK, if the data is valid, and the object exists.
  • PUT /todos/order Update the order of the todos.

    • Input A collection with todo_ids.
    • Response 200 OK, if the data is valid, and the todos exists.

TODO

  • Clean up tests and code
  • Disentangle database from todilo.py
  • Error handling
  • Make button submit the todo
  • DELETE /todos/ to clear a todo
  • XSS/bad stuff - clean/escape the todo text?

About

A todo application, to learn Python (with Flask) and Javascript (Backbone.js)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published