This demo app demonstrates the use of Flask-Login for a simple login system for a Flask application.
Note: This app uses a PostgreSQL database along with Flask-SQLAlchemy
and Flask-Migrate
.
To begin using this app you can do the following:
- Clone the repository to your local machine.
- Create a Python virtual environment e.g.
python -m venv venv
(orpython3 -m venv venv
) - Enter the virtual environment using
source venv/bin/activate
(or.\venv\Scripts\activate
if you are using Windows) - Install the dependencies using Pip. e.g.
pip install -r requirements.txt
. Note: Ensure you have PostgreSQL already installed and a database created. - Edit the
app/__init__.py
file and enter your database credentials and database name. - Run the migrations by typing
python manage.py db upgrade
- Ensure you add a user to your database to test the login system.
- Start the development server using
python run.py
.