Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9423 closed (invalid)

multi inline model

Reported by: anonymous Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by kmtracey)

I have this in my file :

class AInLine(admin.StackedInline):
    model = A
class BAdmin(admin.ModelAdmin):
    model = B
    inlines = [AInLine]
class BInLine(admin.StackedInline):
    model = B

class CAdmin(admin.ModelAdmin):
    model = C
    inlines = [BInLine]

In the admin interface

+ the inline model AInLine is in BAdmin form : it's correct.

+ the inline model BInLine in CAdmin form : it's correct.

But I don't have in CAdmin form the inline model AInLine, it's normal ?

Can i have multiple inline model in one form with my file ?

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

This is a user question and should not be asked on the ticket tracker. Please post your question on the django-users mailing list or in #django on freenode. You can have as many inlines in a ModelAdmin as you want. It is a list.

comment:2 Changed 5 years ago by kmtracey

  • Description modified (diff)

Beaten to the close! But I'll post this anyway since I think (though it isn't entirely clear from the description) that it's looking for nested, not simply multiple, inlines, and that's already requested in another ticket.

As written this ticket is more appropriate as a question on django-users -- you are asking if something is supported, not reporting a bug. Please do not use the tracker for support questions. As it is I think what you want nested inlines, which is #9025.

Also please do use the preview button, your code examples were hard to read as originally posted due to improper formatting.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.