MCPcopy Create free account
hub / github.com/MongoEngine/mongoengine / queryset_manager

Function queryset_manager

mongoengine/queryset/manager.py:50–58  ·  view source on GitHub ↗

Decorator that allows you to define custom QuerySet managers on :class:`~mongoengine.Document` classes. The manager must be a function that accepts a :class:`~mongoengine.Document` class as its first argument, and a :class:`~mongoengine.queryset.QuerySet` as its second argument. The meth

(func)

Source from the content-addressed store, hash-verified

48
49
50def queryset_manager(func):
51 """Decorator that allows you to define custom QuerySet managers on
52 :class:`~mongoengine.Document` classes. The manager must be a function that
53 accepts a :class:`~mongoengine.Document` class as its first argument, and a
54 :class:`~mongoengine.queryset.QuerySet` as its second argument. The method
55 function should return a :class:`~mongoengine.queryset.QuerySet`, probably
56 the same one that was passed in, but modified in some way.
57 """
58 return QuerySetManager(func)

Callers

nothing calls this directly

Calls 1

QuerySetManagerClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…