pyramid_jsonapi.callbacks_doc module¶
- pyramid_jsonapi.callbacks_doc.after_collection_get(view_instance, document)[source]¶
Called just before view_instance.collection_get() returns.
- pyramid_jsonapi.callbacks_doc.after_get(view_instance, document)[source]¶
Called just before view_instance.get() returns.
Called before view_instance.related_get() returns.
- pyramid_jsonapi.callbacks_doc.after_relationships_get(view_instance, document)[source]¶
Called before view_instance.relationships_get() returns.
- pyramid_jsonapi.callbacks_doc.after_serialise_identifier(view_instance, identifier)[source]¶
Called after a resource identifier is serialised, before it is returned.
- pyramid_jsonapi.callbacks_doc.after_serialise_object(view_instance, obj)[source]¶
Called after a resource object is serialised, before it is returned.
Use this callback to alter objects as they are serialised: perhaps merging information from other data sources, perhaps removing restricted information or denying access (raise an appropriate exception).
- pyramid_jsonapi.callbacks_doc.before_collection_post(view_instance, obj)[source]¶
Called before enacting view_instance.collection_post().
- Parameters
view_instance (pyramid_jsonapi.CollectionViewBase) – the current view instance.
obj (dict) – JSON-API object to be created.
- pyramid_jsonapi.callbacks_doc.before_delete(view_instance, db_item)[source]¶
Called before an object is deleted.
- Parameters
view_instance (pyramid_jsonapi.CollectionViewBase) – the current view instance.
db_item – item returned by sqlalchemy query.
- pyramid_jsonapi.callbacks_doc.before_patch(view_instance, partial_object)[source]¶
Called before a patch is applied.