Flask-CRUD
A Python Flask CRUD application template with mySQL, Bootstrap, modal dialogs, Font Awesome icons, flask-migrate, authentication, sessions, email verification, webform emails, custom decorators and SQLAlchemy.
Why start from scratch?
Installation:
- Clone project using git
- From project home directory (where app.py sits), create a virtual environment for dependencies. Use https://flask.palletsprojects.com/en/1.1.x/installation/ as a reference. I recommend naming it
venv
, which has already been added to the .gitignore file. - Activate the virtual environment directory.
- Use
pip install -r requirements.txt
to install all dependencies. - Make a copy of the
config.orig.py
file and name the copyconfig.py
. - Set the configuration values in config.py file. NOTE: This file holds sensitive information such as passwords and keys. It is excluded from the default .gitignore file. Keep this file secure!
- From the home directory, initialize the database by running the
initdb
file -python3 initdb.py
. - Start the server from the home directory:
python3 app.py
or use your IDE to start the server. - If all went well, you should be able to view the site:
http://127.0.0.1:5000/
. - To make sure your database is working, navigate to the View Dogs link. You should see an entry for Romeo.
Coming soon in future versions: (Feel free to create a branch if you want to contribute!)
- Code cleanup into modules
- Add login redirects to bring you to the target page after login
- File uploads