Removing the automatic colon from newforms' _html_output
|Reported by:||anonymous||Owned by:||gnuvince|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The _html_output() method automatically adds a colon at the end of a field's label if the label name does not end with a punctuation symbol. I move to completely remove this behavior and let the programmer choose if he wants a colon or not by specifying it him/herself in his form definition. Django should not make presentation decisions for the user.
Here is the code in question, it's in django/newforms/forms.py on line 132 in r6345
# Only add a colon if the label does not end in punctuation. if label[-1] not in ':?.!': label += ':'
Change History (4)
comment:1 Changed 9 years ago by gnuvince
- Needs documentation unset
- Needs tests unset
- Owner changed from nobody to gnuvince
- Patch needs improvement unset
- Status changed from new to assigned