-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
topic-pluginsThe plugin API and ideas for new pluginsThe plugin API and ideas for new plugins
Description
In Django, there's a method called as_manager()
on QuerySet
https://docs.djangoproject.com/en/3.0/ref/models/querysets/#django.db.models.query.QuerySet.as_manager
which returns an instance of a dynamically created manager with callee QuerySet
method copied inside
class AnonymousManager(models.Manager):
... methods of QuerySet callee copied ...
I'd like to be able to call it like with generic parameters
MyQuerySet[MyModel].as_manager()
Now, because of clause
if isinstance(callee_expr, RefExpr) and callee_expr.fullname:
method_name = call.callee.name
fname = callee_expr.fullname + '.' + method_name
get_dynamic_class_hook()
never called. callee_expr
is TypeApplication
here, not RefExpr
.
Metadata
Metadata
Assignees
Labels
topic-pluginsThe plugin API and ideas for new pluginsThe plugin API and ideas for new plugins