A Flask MVC-style application base.
Elemental was written to provide my most basic needs in public-facing Flask apps. A quick rundown of what it provides:
- A signup, login, logout and hello world view
- User-related code is dependent on flask-login and uses bcrypt for passwords
- MongoDB as a backend with MongoEngine as the ODM
- flask-admin to provide quick admin views of MongoDB collections
- flask-wtf for forms
- A common ancestor template (
header.html
) to inherit, which provides Bootstrap (and a navbar) and jQuery - A basic, logical separation of the application inspired by the MVC software pattern.
Be sure to edit the elemental/config/config.py file to settings that suit your environment. Primarily, be sure to change the MONGO_SETTINGS['host']
setting in config.py.
The Flask development server can be invoked from a Python environment that has installed the requirements in requirements.txt
.
$ python runapp.py
I wrote Elemental with the intent of running derivative apps with Gunicorn in production.
- flask-login
- flask-admin
- flask-debugtoolbar
- flask-mongoengine
- flask-bcrypt
- flask-wtf
Apache 2.0