#18133: global settings for label_suffix -------------------------------------+------------------------------------- Reporter: Evil Clay | Owner: nobody <clay.evil@…> | Status: closed Type: New feature | Version: 1.4 Component: Uncategorized | Resolution: invalid Severity: Normal | Triage Stage: Keywords: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Evil Clay <clay.evil@…>): Hi. Again, i'm sorry. as in #18134 i'm talking about the same area https://docs.djangoproject.com/en/dev/ref/forms/api/#configuring-html- label-tags Normally, a colon (:) will be appended after any label name when a form is rendered. It's possible to change the colon to another character, or omit it entirely, using the label_suffix parameter: f = ContactForm(auto_id='id_for_%s', label_suffix="") So if i want to change to colon to something else for my ENTIRE project i would have to either: 1. set it in my code on every form instantination (i.e. f = ContactForm(label_suffix="")) which is wicked and dirty and just wrong...(but good if you want to change the suffix only on one page etc..) 2. override the two classes forms.Form and forms.ModelForm and use them in the project as parents for all my forms see the description above. I'm in believe that removing the hardcoded label_suffix=":" in: 1. class BaseModelForm Found at: django.forms.models init method 2. class BaseForm Found at: django.forms.forms init method and replace it which something like "label_suffix=settings.LABLE_SUFFIX" would not be that much work. However i'm not an expert on the internals of django, so it's just IMHO. -- Ticket URL: <https://code.djangoproject.com/ticket/18133#comment:2> Django <https://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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.