Documentation on creating custom querysets
|Reported by:||Owned by:||nobody|
|Cc:||mike@…, ognajd@…||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently Django's documentation describes how customize the manager's initial query set (https://docs.djangoproject.com/en/dev/topics/db/managers/#modifying-initial-manager-querysets), but not how to create filters that can be used on an existing query set, at any position in the chain of filters.
Doing so requires subclassing the queryset object. This blog post describes the issue in more detail and proposes a solution:
It would be helpful if there were an officially approved way to subclass querysets or add custom chainable filters, and it was part of the documentation.
Change History (9)
comment:2 Changed 6 years ago by
|Triage Stage:||Design decision needed → Accepted|
|Type:||Uncategorized → New feature|