Skip to main content

A set of generic class-based views for flask

Project description

Flask-Generic-Views is a set of generic class-based views for the Flask microframework inspired by the ones in Django.

from flask import Flask
from flask.ext.generic_views import TemplateView

app = Flask(__name__)

index_view = TemplateView.as_view('index', template_file='index.html')

app.add_url_rule('/', index_view)

if __name__ == '__main__':
    app.run()

Database Support

Currently Flask-Generic-Views supports use of Models created with SQLAlchemy.

Installation

To install the basic views:

$ pip install flask-generic-views

To install optional SQLAlchemy support:

$ pip install flask-generic-views[sqlalchemy]

To install all optional packages:

$ pip install flask-generic-views[all]

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page