#18133 closed New feature (wontfix)
global settings for label_suffix — at Version 1
| Reported by: | 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 (last modified by )
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 (1)
comment:1 by , 14 years ago
| Description: | modified (diff) |
|---|---|
| Resolution: | → invalid |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed formatting of the ticket description. Please use preview.
Again, as with #18134, you've suggested a solution that modifies API, but you haven't described the problem you're trying to solve, or the effect that the new label_suffix would have.
Closing invalid; feel free to reopen if you care to provide more details.