Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow use_for_related_fields via as_manager() #5076

Closed
wants to merge 5 commits into from

Conversation

litchfield
Copy link
Contributor

The as_manager() method allows easy creation of chain-able managers. One of the most common use cases for these is with related fields. However, as_manager() doesn't currently allow use_for_related_fields to be specified. This patch proposes it could be set simply by way of an attribute on the QuerySet class, in the same way it currently does for Manager classes.

Patch is backwards compatible and includes docs (could be improved).

Ticket --
https://code.djangoproject.com/ticket/25201#ticket

Discussion --
https://groups.google.com/forum/#!topic/django-developers/hVbA6sWElPc

@litchfield
Copy link
Contributor Author

Please ignore this for now. Further testing seems to indicate use_for_related_fields doesn't seem to be necessary anyway.

@litchfield litchfield closed this Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant