Django popup for Inlines

I have a problem. I have three models: A, B and C.

Class A

Class B
    fb = foreignkey(A)

Class C
    fc = foreignkey(B)

In admin.py, I am doing something like

AdminA
    inlines = [inlineB]

AdminB
    inlines = [inlineC]

Problems appear on the page for adding model A. In principle, model B is simply a placeholder for different multinational and foreign fields and does not have its own internal fields. Therefore, although I can add an inline model for Model B, I cannot add any functions to it. I was hoping to find a way to get the popup link in Inline lines. Something like a popup that opens when you need to create a foreginkey. Any ideas?

+3
source share

Source: https://habr.com/ru/post/1768346/


All Articles