Opened 16 years ago
Closed 12 years ago
#10590 closed New feature (wontfix)
Support nested fieldsets in administration
Reported by: | Archatas | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Normal | Keywords: | nested fieldsets |
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
Administration options should allow to have nested fieldsets for grouping fields in a more organized way.
For example,
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.contrib import admin from halmastar.apps.sandbox.models import Contact class ContactAdmin(admin.ModelAdmin): fieldsets = ( (_("Main Info"), {'fields': ("user", "website")}), (_("Phones"), {'fields': ( (_("Primary"), {'fields': (("primary_phone_country", "primary_phone_area", "primary_phone_number"),)}), (_("Secondary"), {'fields': (("secondary_phone_country", "secondary_phone_area", "secondary_phone_number"),)}), )}), ) admin.site.register(Contact, ContactAdmin)
The key 'fields' point to a list of field names, field-name tuples, or fieldset definitions.
Attachments (2)
Change History (8)
by , 16 years ago
Attachment: | nested_fieldsets.png added |
---|
comment:1 by , 16 years ago
milestone: | 1.1 beta |
---|
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:6 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Thanks for the proposal, but there doesn't appear to be a lot of demand for this feature, and I'm not convinced it's a win for the UX.
I suggest using custom CSS classes — the admin provides appropriate hooks to set CSS classes on fieldsets and to inject custom CSS.
Note:
See TracTickets
for help on using tickets.
An example of nested fieldsets