Opened 12 years ago

Last modified 12 years ago

#18133 closed New feature

global settings for label_suffix — at Initial Version

Reported by: Evil Clay <clay.evil@…> Owned by: nobody
Component: Uncategorized Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top