#4975: Colons: Always appended to labels
------------------------------+---------------------------------------------
Reporter: rtconner | Owner: adrian
Status: new | Component: django.newforms
Version: SVN | Resolution:
Keywords: newforms forms | Stage: Design decision needed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------------+---------------------------------------------
Changes (by SmileyChris):
* stage: Unreviewed => Design decision needed
Comment:
It's come up before and the answer has been "don't use _html_output", but
I think that perhaps there's a place for a `label_tag_func` function on
`BaseForm`.
It would also allow for things like building a label which says "Email
(optional):"
The default func would look something like:
{{{
def label_tag_func(bf):
label = escape(force_unicode(bf.label))
# Only add a colon if the label does not end in punctuation.
if label[-1] not in ':?.!':
label += ':'
return label
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/4975#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---