Opened 11 years ago

Last modified 7 weeks ago

#4848 new New feature

Allow inline fields to be "mixed in" with the models' own fields

Reported by: leifbyron Owned by: nobody
Component: contrib.admin Version: newforms-admin
Severity: Normal Keywords: nfa-someday newforms-admin inline models fields
Cc: ckesselh, gezuru@…, andreas@…, Frank Sachsenheim Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In newforms-admin, it would be quite helpful to be able to specify both a models' fields and its inline models' fields in the fields tuple of the options class. This would allow inline model fields to be "mixed in" with the models' own fields on the model's admin page. There are many situations where this would be preferable to the current situation -- always having inline model fields rendered below the models' own fields.

I suggested this feature in the Django-developers group, and Adrian suggested that I open a ticket.

http://groups.google.com/group/django-developers/browse_thread/thread/c54d026eb46ad375/93bebf102281bb41#93bebf102281bb41

Change History (14)

comment:1 Changed 11 years ago by anonymous

Yes, I recently stumbled across that missing feature and I agree that it would be highly desirable. --lupo

comment:2 Changed 11 years ago by jkocherhans

Triage Stage: UnreviewedAccepted

I'd rather come up with some way of naming each inline and using those names in the fields or fieldsets, but allowing inline forms to be placed in the middle of other form fields would be a great feature.

comment:3 Changed 11 years ago by Brian Rosner

Keywords: nfa-someday added

This can be written backward compatible after the merge of newforms-admin.

comment:4 Changed 10 years ago by Brian Rosner

milestone: post-1.0

comment:5 Changed 10 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:6 Changed 8 years ago by mlindsey

I would also like to see this feature.

comment:7 Changed 8 years ago by Ramiro Morales

#14491 asked for the possibility to intermix inlines with fieldsets and was closed as duplicate of this ticket.

comment:8 Changed 8 years ago by Gabriel Hurley

Severity: Normal
Type: New feature

comment:9 Changed 7 years ago by ckesselh

Cc: ckesselh added
Easy pickings: unset
UI/UX: unset

comment:10 Changed 7 years ago by gezuru@…

Cc: gezuru@… added

comment:11 Changed 4 years ago by Collin Anderson

Summary: Feature Proposal: Allowing inline fields to be specified in the fields tuple (newforms-admin)Allow inline fields to be "mixed in" with the models' own fields

comment:12 Changed 3 years ago by Andreas Nüßlein

Cc: andreas@… added

comment:13 Changed 8 months ago by Karolis Ryselis

Is this still relevant? My vision on this is to promote inlines to fieldsets. It could look like this in admin class:

fieldsets = (
    ("Normal fieldset", {"fields": ("main_model_field1", "main_model_field2")}),
    ("Related inline fieldset", {"inline_class": RelatedModelInline})
)

We could keep the current inlines attribute for backwards compatibility and add those inlines as last fieldsets to the form. Getting inlines for form submission would require checking fieldsets instead of inlines.

I could implement this feature.

comment:14 Changed 7 weeks ago by Frank Sachsenheim

Cc: Frank Sachsenheim added

@Karolis, i think the proposal formulated by @jkocherhans is more flexible as it allows multiple inlines mxied with fields within a fieldset.

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