Re: [Question] Why BaseManager._get_queryset_methods need use getattr(self.get_queryset(), name) in create_method

2024-02-27 Thread Tim Graham
Hi Ryoma, a good way to investigate this would be to make the change and see if anything breaks. If I understand correctly, your suggest is: -return getattr(self.get_queryset(), name)(*args, **kwargs) +return method(*args, **kwargs) In that case, running the tes

[Question] Why BaseManager._get_queryset_methods need use getattr(self.get_queryset(), name) in create_method

2024-02-27 Thread Ryoma Han
I've been reading through the Django source code the last few days. When I was reading the BaseManager source code I saw a method like this: ```python @classmethod def _get_queryset_methods(cls, queryset_class): def create_method(name, method): @wraps(method)