[Fixed]-Django Admin inline for recursive ManyToMany


May be its’ to late, but I try answer this question. Ticket.replies.through is a table to manage many-to-many relations, it has fields from_ticket and to_ticket(FK to model Ticket) and you can set this fields as option fk_name for TabularInline.

class TicketReply(admin.TabularInline):
    model = Ticket.replies.through
    fk_name = 'from_ticket'

Leave a comment