Opened 18 years ago
Closed 18 years ago
#4589 closed (wontfix)
[newforms-admin] Add an option to `ModelAdmin`: section_name
| Reported by: | yi.codeplayer at gmail dot com | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | newforms-admin |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Design decision needed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Currently, admin interface use app label to group models into sections and use app label as the section name, but i think use a admin option to specify the section name would be more flexibly (e.g. you can use non-ascii character in the option but can't do that in app label, and the models in the same app can be displayed in several sections).
I named this option as section_name currently.
If not specified, the value of section_name is the same as app_label.
I've been using this feature widely, and i hope it can be accepted.
Attachments (1)
Change History (4)
by , 18 years ago
| Attachment: | add_section_name_option.patch added |
|---|
comment:1 by , 18 years ago
| Summary: | newforms-admin: Add an option to `ModelAdmin`: section_name → [newforms-admin] Add an option to `ModelAdmin`: section_name |
|---|---|
| Triage Stage: | Unreviewed → Design decision needed |
comment:2 by , 18 years ago
comment:3 by , 18 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
This would require you to put section_name all over the place, and would end up in a lot of duplication. Also, I think there is a better solution for this as part of #3591. Please bring this up on django-dev if you want to plead your case.
I like this patch very much. I use it and I hope it will be accepted. But I think there should be capfirst and not title:
In [1]: from django.utils.text import capfirst In [2]: capfirst('My application') Out[2]: u'My application' In [3]: 'My application'.title() Out[3]: 'My Application' In [4]: capfirst('URLconf information') Out[4]: u'URLconf information' In [5]: 'URLconf information'.title() Out[5]: 'Urlconf Information'