Opened 18 years ago
Closed 18 years ago
#3267 closed defect (fixed)
[patch] textfield rendered as textarea
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
enhancements:
- models.py takes modelfield.editable into account (fields with editable=false are not drawn and not considered during model/instance to form transformation)
- a textfields default widget is now widgets.Textarea
bugfix:
When tranforming a model with a foreignkey field named "category" into a form with form_for_model/form_for_instance, posting that form, populating the posted data into this form and finally hitting save() on that form instance, the foreignfield won't be saved into db as in field "category" now is a unicode string, not a Category-Instance: "Invalid value: 'category' should be a <class 'icoc.extranet.models.Category'> instance, not a <type 'unicode'>".
I fixed this in mapping the column names to the db column names.
Though I'm not sure if this is at the right point of the process.
I ensured all the tests succeed.
Attachments (1)
Change History (3)
comment:1 by , 18 years ago
Summary: | [patch] enhancements in models.py / textfield rendered as textarea → [patch] textfield rendered as textarea |
---|---|
Type: | enhancement → defect |
- modelfield.editable already handled by Ticket 3247
- foreignkey-bugfix already handled by Ticket 3257
- textfield rendered as textarea still open, see new posted diff
by , 18 years ago
Attachment: | newforms_textfield_rendered_as_textarea.diff added |
---|
Exists only the "textfield rendered as textarea" part, forget the diff above
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |