#18133: global settings for label_suffix
-----------------------------------------+--------------------
     Reporter:  Evil Clay <clay.evil@…>  |      Owner:  nobody
         Type:  New feature              |     Status:  new
    Component:  Uncategorized            |    Version:  1.4
     Severity:  Normal                   |   Keywords:
 Triage Stage:  Unreviewed               |  Has patch:  0
Easy pickings:  0                        |      UI/UX:  0
-----------------------------------------+--------------------
 hi, would it be possible to make label_suffix settable in settings file?
 now, if i want to change the suffix for the whole site, i have to have in
 my code something like this:

 class MyModelForm(forms.ModelForm):

     def __init__(self, data=None, files=None, auto_id='id_%s',
 prefix=None,
                  initial=None, error_class=ErrorList, label_suffix='',
                  empty_permitted=False, instance=None):
         super(MyModelForm, self).__init__(data, files, auto_id, prefix,
 initial,
                                             error_class, label_suffix,
 empty_permitted, instance)


 class MyForm(forms.Form):

     def __init__(self, data=None, files=None, auto_id='id_%s',
 prefix=None,
                  initial=None, error_class=ErrorList, label_suffix='',
                  empty_permitted=False):
         super(MyForm, self).__init__(data, files, auto_id, prefix,
 initial,
                                             error_class, label_suffix,
 empty_permitted)

 and then inherit all my forms from this classes. But this is rather a way
 around then a solution. Anyways it doesn't feel pretty.
 Thank you.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18133>
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 [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.

Reply via email to