Opened 17 years ago
Last modified 11 years ago
#10938 closed New feature
add inlines into fieldsets — at Version 6
| Reported by: | tangc | Owned by: | Aymeric Augustin |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | inlines fieldsets |
| Cc: | cg@…, ckesselh, gargr, gezuru@… | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | yes |
Description (last modified by )
'ModelAdmin has fieldsets and inlines. e.g.
Ref: http://docs.djangoproject.com/en/dev/intro/tutorial02/,
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date']}),
]
inlines = [ChoiceInline]
If can put the inlines into the fieldsets, it would be great. such as:
fieldsets = [
(None, {'fields': ['question']}),
('inlines sample', {inlines : [ChoiceInline]}),
('Date information', {'fields': ['pub_date']}),
('inlines sample 2', {inlines : [SomeOtherChoiceInline]}),
]
Change History (6)
comment:1 by , 17 years ago
comment:2 by , 16 years ago
Bump -- I finally managed to find this bug and find that there is apparently no way to accomplish this. It's surprising. This feature would be quite useful.
comment:3 by , 16 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
I'm not sure I agree that this would be an improvement. Feel free to open a discussion on django-dev if you disagree.
comment:4 by , 15 years ago
| Cc: | added |
|---|
comment:5 by , 14 years ago
| Easy pickings: | unset |
|---|---|
| Resolution: | wontfix |
| Severity: | → Normal |
| Status: | closed → reopened |
| Triage Stage: | Unreviewed → Accepted |
| Type: | → New feature |
| UI/UX: | set |
| Version: | 1.0 → SVN |
Reopened as per discussion on django developers. Since inlines already have a label (in the form of verbose_name) and can control their fields etc., perhaps the following syntax would make more sense:
fieldsets = (
(None, {'fields': 'field1', 'field2'}),
SomeInline,
("Remaining Fields", {'fields': 'field3', 'field4', 'field5'})
)
comment:6 by , 14 years ago
| Description: | modified (diff) |
|---|---|
| Owner: | changed from to |
| Status: | reopened → new |
Or such as:
fieldsets = [ (None, {'fields': ['question']}), ('inlines sample', {inlines : [ChoiceInline]}), ('Date information', {'fields': ['pub_date']}), ('inlines sample 2', {inlines : [SomeOtherChoiceInline]}), ('inlines sample 3', {inlines : ['fieldA', 'fieldB', ]}), ]