We are going to use the Flask framework to create a simple To Do list application in Python. The view templates will be defined using Jinja 2 and the users and todo items will be stored in a MongoDB database hosted on Compose.
You will need to install the Python download and execute the installer;
Setting up their Windows paths:
Python path C:/FOLDER/PYTHON
Pip path C:/FOLDER/PYTHON/Scripts
You will need to install the Flask framework by executing the following command:
pip install flask
The todo1 project implements the login functionality using cookies. The login is very basic and only checks that the password is the same as the username.
The todo2 project implements the login functionality using a session. The login still only checks that the password is the same as the username.
We are going to use MongoDB to store out users and to do list items. We need the Flask MongoEngine which can be installed by executing the following command:
pip install flask-mongoengine
The todo3 project checks is checking the username and password against entries in the MongoDB database.
The todo4 project is retrieving, adding and deleting the to do list items in the database.