Hello Mentors and contributors, I’m a web site developer , when I use Django . I custom a class < SomeQuery > base on < Query >, and modify it’s attribute ‘compiler' to Another one <OtherSQLCompler> which custom by myself,. But when I use < SomeQuery > in a < Queryset > object, and call the method filter() with a params ~Q() ,it will call the method ‘split_exclude’ in < Query >, In the line 1772 in the file <django/db/models/sql/query.py>
# Generate the inner query. query = Query(self.model) The code instance a object by the base class < Query >, but I want it instance a object base on < SomeQuery > So why we don’t make the code like this query = self.__class__(self.model) I think that is the correct way . -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/93ef71bd-3fe3-4412-9c1c-886f88cbfaaan%40googlegroups.com.