Opened 18 years ago
Closed 18 years ago
#3401 closed (duplicate)
[patch] newforms: models.CharField with choices should be displayed as forms.ChoiceField according to oldforms behavior
Description ¶
Hello Adrian
With oldforms any model.CharField(..., choices=(...)) is displayed as <select ...> ...choices...</select>
In newforms this feature seem to be unimplemented yet and model.CharField is always displayed as forms.CharField. This behavior is unexpected. Attached patch fixes this.
Change History (4)
by , 18 years ago
Attachment: | char_field_with_choices.patch added |
---|
comment:1 by , 18 years ago
P.S. I DO know that it can be also done manually through callback function to form_to_model/form_to_instance calls, but it seems to be not right in this situation because if I always need to specify callback_func, there's no reason to me to specify choices=() in the model.
comment:3 by , 18 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
marking a duplicate of #3268 and have made a note there about the patch attached here.
patch that fixes the issue