Module Expr Str ImportFrom alias ImportFrom alias alias alias ImportFrom alias ClassDef bases NameLoad NameLoad NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad NameLoad body Expr Str Pass decorator_list
N/A N/A 
Module provides classes for rendering views for SQLAlchemy based models.

Note
----
The following packages must be installed:

* ``Flask SQLAlchemy``
 flask_velox.mixins.context ContextMixin flask_velox.mixins.sqla.read ListModelMixin ObjectMixin TableModelMixin flask_velox.mixins.template TemplateMixin ModelListView N/A ListModelMixin ContextMixin TemplateMixin N/A N/A  Handles rendering templates which list out model objects.

    Example
    -------

    .. code-block:: python
        :linenos:

        from flask import Flask
        from flask.ext.sqlalchemy import SQLAlchemy
        from flask.ext.velox.views.sqla.model import ModelListView
        from yourapp.models import SomeModel

        app = Flask(__name__)
        db = SQLAlchemy(app)

        class MyListView(ModelListView):
            template = 'templates/list.html'
            session = db.session
            model = SomeModel

        app.add_url_rule('/', view_func=MyListView.as_view('list'))

        app.run()

     N/A N/A TableModelView N/A TableModelMixin ModelListView N/A N/A  View renders model lists in a table extending :py:class:`ModelListView`
    adding extra attributes to configure the table output.
     N/A N/A ObjectView N/A ObjectMixin TemplateMixin N/A N/A  View for rendering a single SQLALchemy object within a template.

    Example
    -------
    .. code-block:: python
        :linenos:

        from flask import Flask
        from flask.ext.sqlalchemy import SQLAlchemy
        from flask.ext.velox.views.sqla.read import ObjectView
        from yourapp.models import SomeModel

        app = Flask(__name__)
        db = SQLAlchemy(app)

        class MyObjectView(ObjectView):
            template = 'templates/object.html'
            session = db.session
            model = SomeModel

        app.add_url_rule('/', view_func=MyObjectView.as_view('object'))

        app.run()

    See Also
    --------
    * :py:class:`flask_velox.mixins.sqla.read.ObjectMixin`
     N/A N/A