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)
| 48 | |
| 49 | |
| 50 | def 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) |
nothing calls this directly
no test coverage detected
searching dependent graphs…