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

Feature/virtual fields & sourcefieldswitcher #31

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

jarekwg
Copy link
Member

@jarekwg jarekwg commented Oct 3, 2022

  1. Introduces SourceFieldSwitcher, a pseudo-field for allowing a variety of different columns to map to the same destination.
    This is super useful for FKs, which you might want to look up by, say, name or ref.

  2. Tidies up a lot of the form class creation code into a separate formclassbuilder file.

  3. Drops the need for defining "virtual_fields". This was a lazy way of telling DMI that a field was to be present on the form despite not coming explicitly from the import file. FlatRelatedField was already being handled automatically, however JSONField and anything using CompositeLookupWidgets wasn't. Moving forward, all these fields will just work properly without needing to define stuff in "virtual_fields".

@jarekwg jarekwg merged commit f920b76 into master Oct 3, 2022
@jarekwg jarekwg deleted the feature/virtual-fields-sourcefieldswitcher branch October 3, 2022 12:12
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