Datalayer class should contain some attribute, which would define default queryset (query manager) attribute. Nowadays, it's objects. But one could want something else, some non-default queryset. Maybe this should work:
class MongoengineDataLayer(Mongo):
"""
Data layer for eve-mongoengine extension.
Most of functionality is copied from :class:`eve.io.mongo.Mongo`.
"""
json_encoder_class = MongoengineJsonEncoder
_structured_fields = (EmbeddedDocumentField, DictField, MapField)
# new attribute! ------------------------------------------------------
default_queryset_attr = 'objects'
# ---------------------------------------------------------------------
....
Datalayer class should contain some attribute, which would define default queryset (query manager) attribute. Nowadays, it's
objects
. But one could want something else, some non-default queryset. Maybe this should work: