An extension to Flask that provides a set of generic class based views. It aims to simplify applications by providing a set of well tested base classes and pluggable views for common tasks.
For more information check the Documentation.
from flask import Flask
from flask_generic_views import TemplateView, RedirectView
app = Flask(__name__)
index = RedirectView('index', url='/home')
app.add_url_rule('/', view_func=index)
home = TemplateView('home', template_name='home.html')
app.add_url_rule('/home', view_func=home)
if __name__ == '__main__':
app.run()
To install Flask-Generic-Views via pip:
pip install flask-generic-views
To install from source:
git clone git://github.com/artisanofcode/flask-generic-views.git cd flask-generic-views python setup.py develop
See CHANGES
This project is licensed under the MIT licence.
This project uses Semantic Versioning.