https://github.com/robertoprevato/flask-three-template
Project template for Python Flask three-tier web applications
https://github.com/robertoprevato/flask-three-template
Last synced: 1 day ago
JSON representation
Project template for Python Flask three-tier web applications
- Host: GitHub
- URL: https://github.com/robertoprevato/flask-three-template
- Owner: RobertoPrevato
- License: mit
- Created: 2015-11-02T19:21:56.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-01T07:07:18.000Z (over 9 years ago)
- Last Synced: 2025-05-07T22:12:17.487Z (5 months ago)
- Language: Python
- Homepage:
- Size: 623 KB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask-three-template
Project template for Python Flask three-tier web applications.## Features
* Project skeleton ready to use, to start a three tier web application using Flask for its presentation layer.
* Localization strategy, using Flask-Babel.
* Authentication and authorization strategies, including anonymous authentication.
* Antiforgery token validation strategy (session based, dual token technique; for AJAX requests and regular form posts)
* Login mechanism protected against brute forcing (stores login attempts in DB).
* DB based sessions strategy.
* MongoDB collections for accounts, sessions, login attempts.
* Example files for production deployment using Nginx and uWSGI servers.
* Skeleton for data access layers for MongoDB.
* Skeleton for unit testing.
* Custom error pages.
* Application db logger, to store and retrieve messages and exceptions logs in database## Branches
* [empty-project](https://github.com/RobertoPrevato/flask-three-template/tree/empty-project): empty template without any authentication strategy.
* [master](https://github.com/RobertoPrevato/flask-three-template/tree/master): template with custom authentication and authorization strategy.
* [spa-humbular](https://github.com/RobertoPrevato/flask-three-template/tree/spa-humbular): template with Humbular Single Page Application strategy.
* [spa-aurelia](https://github.com/RobertoPrevato/flask-three-template/tree/spa-aurelia): Single Page Application template using Aurelia framework.## How to prepare the environment
* Python.
* [Flask](http://flask.pocoo.org/).
* [Flask-Babel](https://pythonhosted.org/Flask-Babel/).
* pymongo.
* pycrypto.Refer to the [dedicated wiki page](https://github.com/RobertoPrevato/flask-three-template/wiki/Preparing-the-environment), for instructions about how to prepare the environment and install the dependencies.
## Servers setup
* Basic settings file for Nginx.
* Settings file for uWSGI.
* Development server ready to use: Flask itself.## Grunt integration
* JavaScript bundling and minification strategy.
* LESS compilation.## CRUD architecture
The branch spa-humbular includes a strategy to implement SPA administrative sides with CRUD functionalities.
As a working example, the user management feature has been used.
For detailed information, refer to the [dedicated wiki page](https://github.com/RobertoPrevato/flask-three-template/wiki/CRUD-architecture-for-SPA).