Skip to content

Instantly share code, notes, and snippets.

@yi-mei-wang
Last active November 5, 2019 02:39
Show Gist options
  • Save yi-mei-wang/fd400944cd8ef09faca5c7b8670b3c62 to your computer and use it in GitHub Desktop.
Save yi-mei-wang/fd400944cd8ef09faca5c7b8670b3c62 to your computer and use it in GitHub Desktop.
Peewee To-do List

Setting up

  1. Create Conda environment
  2. Install peewee, peewee-db-evolve
  3. Save your installation into requirements.txt
  4. Create a db

Tasks

  1. Create your tables, you may refer to your todo-list schema from our previous challenge if you want
    1. There is no need to create a User model yet
  2. Run migration
  3. Check that your tables are created properly, using Postbird/psql
    1. \dt to check the tables in the db
    2. Use regular SQL queries to check if you items are saved properly
  4. Build the main logic, there are a few levels:
    • Level 1: Get a task from user, save it in the db
    • Level 2: Allow user to create new to-do lists (remember to save it in the db)
    • Level 3: Allow user to select the to-do list they want to add their task from
    • Level 4: Allow user to mark tasks as complete
    • Level 5: Allow user to delete tasks and/or lists
    • Level 6: Allow different users to log in and view their to-do lists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment