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

Fix #375: add row to widget.clean(), obj to widget.render() #479

Merged
merged 3 commits into from Jul 14, 2016
Merged

Fix #375: add row to widget.clean(), obj to widget.render() #479

merged 3 commits into from Jul 14, 2016

Conversation

jnns
Copy link
Contributor

@jnns jnns commented Jun 21, 2016

I accidentally force-pushed/deleted the original pull request branch and as I don't have the means to reopen the previous pull request I'm opening a new one. Please excuse this.

This pull request adds a get_queryset() method to ForeignKeyWidget and makes fields.Field pass row data on to the widgets so that the queryset can be narrowed down in case ForeignKeyWidget.field is not unique on its own.

The obj is exposed to widget.export() as a kwarg as well.

This pull request is related to the following issues: #375 #188 #378
All tests pass on current master branch.

jnns and others added 3 commits June 21, 2016 12:37
Add a method `get_queryset()` to `ForeignKeyWidget` and make `fields.Field`
pass `row` as an additional parameter to `widget.clean()`.  This makes it
possible to use `ForeignKeyWidget` with multi-column identifiers.
@bmihelac bmihelac merged commit 8e81b40 into django-import-export:master Jul 14, 2016
@bmihelac
Copy link
Member

Thanks a lot!

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.

None yet

3 participants