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

2024-02-29 Thread Ryoma Han
Thanks for your answer. I will continue to investigate based on your suggestions and if I find the answer I will respond again. 在2024年2月28日星期三 UTC+8 10:13:09 写道: > Hi Ryoma, a good way to investigate this would be to make the change and > see if anything breaks. > > If I understand correctly,

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

2024-02-29 Thread Ryoma Han
I've found the reason why I've been thinking this wrong way. `getattr(self.get_queryset(), name)` is getting a bound method from Manager.get_queryset() which is a QuerySet class instance, while method is getting function from _queryset_class. The difference is one of them is bound method, whil