Skip to content

marekjs/flask-three-template

 
 

Repository files navigation

Flask-three-template

Project template for Python Flask three-tier web applications. UgRoslein

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: empty template without any authentication strategy.
  • master: template with custom authentication and authorization strategy.
  • spa-humbular: template with Humbular Single Page Application strategy.
  • spa-aurelia: Single Page Application template using Aurelia framework.

How to prepare the environment

Refer to the dedicated wiki page, 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.

crud-architecture

For detailed information, refer to the dedicated wiki page.

About

Project template for Python Flask three-tier web applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.5%
  • HTML 6.2%
  • CSS 1.6%
  • Other 0.7%