[Django]-More than 1 foreign key

80👍

Django doesn’t know which of the two foreign keys (parent and world) is to be inlined using the ElementInline.

class ElementInline(admin.TabularInline):
    model = Element
    fk_name = 'parent' #or 'world', as applicable.
    extra=1

Leave a comment