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

Allowed Q objects in limit_choices_to introspection. #6472

Merged
merged 1 commit into from Feb 25, 2019

Conversation

Projects
None yet
3 participants
@carltongibson
Copy link
Collaborator

carltongibson commented Feb 25, 2019

Closes #6470.

@carltongibson carltongibson added this to the 3.9.2 Release milestone Feb 25, 2019

@tomchristie

This comment has been minimized.

Copy link
Member

tomchristie commented Feb 25, 2019

Ace 👍

@tomchristie tomchristie merged commit 8a29c53 into encode:master Feb 25, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@carltongibson carltongibson deleted the carltongibson:issue/6470 branch Feb 25, 2019

@@ -251,7 +251,9 @@ def get_relation_kwargs(field_name, relation_info):

limit_choices_to = model_field and model_field.get_limit_choices_to()
if limit_choices_to:
kwargs['queryset'] = kwargs['queryset'].filter(**limit_choices_to)

This comment has been minimized.

@luzfcb

luzfcb Mar 8, 2019

@carltongibson cool new feature. A question: it support use a callable like django ForeignKey.limit_choices_to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.