A todo-list CRUD app built with Flask + MongoDB.
Example: https://todo-crud-flask.herokuapp.com
Create user accounts with a username and password. Passwords are salted and hashed.
Create TODO notes and view them in your user dashboard. Update notes or delete them.
Update your profile with your email address. Delete your account to erase your data, including all your notes.
Clone the repository and create a virtualenv
$ git clone https://github.com/andrewmontes87/todo-crud-flask.git
$ cd todo_crud_flask
$ virtualenv venv
Add these two lines to venv/bin/activate
, using a secret key and your mLab credentials:
export SECRET_KEY={'your secret key'}
export MONGO_URI={'mongodb://user:[email protected]:port/user}'
Start the virtualenv
$ source venv/bin/activate
Install packages
(venv)$ pip install -r requirements.txt
Start the app
(venv)$ python todo_crud_flask/routes.py runserver --host 0.0.0.0
The app will be at http://0.0.0.0:5000
To watch scss files for changes during development:
sass --watch todo_crud_flask/static/scss/main.scss:todo_crud_flask/static/css/style.css
Set config variables in Heroku:
- MONGO_URI
- SECRET_KEY
Push to heroku
-
flask-script for command-line options -
flask-moment for datetimes -
404 and 500 pages -
Validate password + repeat password using EqualTo -
Use flash() for messages -
Use flash() and category filtering for form errors -
Package instead of module
-
Blueprints
-
Tests
-
Templating with super()
-
flask-mail
-
Redirect all POSTs