Skip to content

If choices is set on a models.TextField default to a select box rather than a text area #6182

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

Closed
wants to merge 1 commit into from

Conversation

cpmbailey
Copy link

@cpmbailey cpmbailey commented Sep 12, 2018

Description

Do not set the base_template style to textarea.html if choices is set; when it is converted to a ChoiceField it will use the default select.html instead.

refs #6181

…ause it will be converted to a ChoiceField and it is more appropriate to let this default to a select box
@codecov-io
Copy link

codecov-io commented Sep 12, 2018

Codecov Report

Merging #6182 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6182   +/-   ##
=======================================
  Coverage   96.18%   96.18%           
=======================================
  Files         128      128           
  Lines       17630    17630           
  Branches     1458     1458           
=======================================
  Hits        16957    16957           
  Misses        465      465           
  Partials      208      208
Impacted Files Coverage Δ
rest_framework/utils/field_mapping.py 87.59% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f1f2b1...7c1510d. Read the comment docs.

Copy link
Member

@rpkilby rpkilby left a comment

Choose a reason for hiding this comment

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

Hi @cpmbailey. If you could add a test, that would be appreciated.

@rpkilby
Copy link
Member

rpkilby commented Sep 13, 2018

Also cc @tomchristie @carltongibson - is this a change we would want to make? TextField+choices should render dropdown?

@rpkilby
Copy link
Member

rpkilby commented Sep 3, 2019

Superseded by #6892

@rpkilby rpkilby closed this Sep 3, 2019
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.

3 participants