Opened 17 years ago

Closed 17 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)

add_section_name_option.patch (1.7 KB ) - added by yi.codeplayer at gmail dot com 17 years ago.

Download all attachments as: .zip

Change History (4)

by yi.codeplayer at gmail dot com, 17 years ago

comment:1 by Simon G. <dev@…>, 17 years ago

Summary: newforms-admin: Add an option to `ModelAdmin`: section_name[newforms-admin] Add an option to `ModelAdmin`: section_name
Triage Stage: UnreviewedDesign decision needed

comment:2 by Petr Marhoun <petr.marhoun@…>, 17 years ago

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'

comment:3 by jkocherhans, 17 years ago

Resolution: wontfix
Status: newclosed

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.

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