JSON views

Views

JSONDetailView

class flask_views.db.mongoengine.json.JSONDetailView

Detail view for rendering JSON responses for a single object.

This class inherits from:

Usage example:

class ArticleView(JSONDetailView):
    get_fields = {
        'category': 'category',
        'slug': 'slug',
    }
    document_class = Article
get_context_data()

Return the retrieved object.

Returns:JSONDetailView.object.

Mixins

JSONResponseMixin

class flask_views.db.mongoengine.json.JSONResponseMixin

Mixin class for rendering JSON responses out of Mongoengine documents.

This class inherits from:

encoder_class

alias of MongoengineEncoder

Utilities

MongoengineEncoder

class flask_views.db.mongoengine.json.MongoengineEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)

Custom JSON encoder implementation for encoding Mongoengine documents.

Table Of Contents

Related Topics

This Page