[Answered ]-Django admin: how to edit two models with indirect relationship on the single admin view?

2👍

✅

Instead of using the Item model, you could probably use generic foreign keys so that your models become:

Translation
    item (generic foreign key to Article, FaqCategory or FaqItem)
    lang (language code)
    title (string)
    body (string)

Article
    published (datetime)
    visible (boolean)
    item_id (foreign key to Item)

FaqCategory
    item_id (foreign key to Item)

FaqItem
    category_id (foreign key to FaqCategory)
    item_id (foreign key to Item)

Then, you can use inline model admins.

Leave a comment