You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sudipto Ghosh de610ebb17
fixed responsiveness on larger screens
10 months ago
.vscode initial commit 10 months ago
templates fixed responsiveness on larger screens 10 months ago
todo housekeeping for db engine error 10 months ago
todoApp housekeeping for db engine error 10 months ago
LICENSE initial commit 10 months ago
Pipfile initial commit 10 months ago
Procfile initial commit 10 months ago
README.md housekeeping for db engine error 10 months ago
manage.py initial commit 10 months ago

README.md

Django Todo App

This is a simple todo app that uses Django and Postgres. A working example is hosted at Heroku. The following rudimentary API documentation should be helpful:

API

Note: POST requests require CSRF Cookies

Viewing Todos

GET /view/

Response set will be ordered by completion boolean and descending order of date and time.

Example Request:

curl https://todo-app-demo-django.herokuapp.com/view/

Example Response:

{
  "data": [
    {
      "todo_id": 1,
      "todo_content": "This is a todo that has been completed",
      "todo_completed": true,
      "todo_time": "2019-03-14T22:58:00Z",
      "date_created": "2019-03-14T17:26:36.728Z"
    },
    {
      "todo_id": 2,
      "todo_content": "This is a todo that is yet to be completed",
      "todo_completed": false,
      "todo_time": "2019-03-22T07:46:00Z",
      "date_created": "2019-03-14T17:26:36.728Z"
    },
    {
      "todo_id": 3,
      "todo_content": "This is an updated todo",
      "todo_completed": false,
      "todo_time": "2019-03-17T23:03:00Z",
      "date_created": "2019-03-14T17:33:12.513Z"
    }
  ]
}

Adding Todos

POST /add/

  • content (required) - TextField
  • date (required) - MMM DD, YYYY format
  • time (required) - HH:MM AM/PM format
  • browser (required) - 0 for JSON Response, 1 for Redirection

Updating Todos

POST /toggle/

  • id (required) - Todo ID (from /view/)
  • browser (required) - 0 for JSON Response, 1 for Redirection

POST /edit/

  • id (required) - Todo ID (from /view/)
  • content (required) - TextField
  • browser (required) - 0 for JSON Response, 1 for Redirection

Deleting Todos

POST /delete/

  • id (required) - Todo ID (from /view/)
  • browser (required) - 0 for JSON Response, 1 for Redirection

Author

Sudipto Ghosh

License

Licensed under the open-source MIT License