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

ForeignKeyWidget: add get_lookup_kwargs() #1651

Conversation

matthewhegarty
Copy link
Contributor

Problem

Closes #1516
In order to override ForeignKey lookup you have to override the clean() method.

Solution

Add an overrideable method get_lookup_kwargs()

Also fixes a bug in the test app where the author's birthday could never be set.

Acceptance Criteria

Test added.

Copy link

@pokken-magic pokken-magic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This granularity is useful all over in terms of improving the customizability.

@matthewhegarty matthewhegarty merged commit 0e5ee68 into django-import-export:release-4 Oct 11, 2023
11 checks passed
@matthewhegarty matthewhegarty deleted the issue-1516-add-get-lookup-kwargs branch October 11, 2023 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants