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

CharWidget optimisations #1414

Conversation

matthewhegarty
Copy link
Contributor

@matthewhegarty matthewhegarty commented Apr 5, 2022

Problem

CharWidget did not appear in resources.WIDGET_MAP - this is not an issue because the functionality of CharWidget is equivalent to Widget. However this does mean that there is a redundant method in CharWidget which I have removed.

Solution

  • Updated WIDGETS_MAP to return CharWidget for CharField for consistency.
  • Removed redundant method render() from CharWidget (it is equivalent to the Widget method)

Acceptance Criteria

  • Added tests

@matthewhegarty matthewhegarty changed the base branch from main to release-3-x April 5, 2022 17:23
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.

I don't see any issues with this or why it wouldn't pass tests. Appreciate you adding Charwidget to the map, I'll close that discussion item out :)

tests/core/tests/test_resources.py Show resolved Hide resolved
@matthewhegarty matthewhegarty merged commit f335dba into django-import-export:release-3-x Apr 5, 2022
@matthewhegarty matthewhegarty deleted the CharWidget-test-case branch April 5, 2022 19:13
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

2 participants