Reputation: 181
We have following Database design
Payment table with user id from user table Profile table one-to-one with User table Registration table one to one with User table
In the admin system we want to provide the profile object with Payment details and Registration Details. As there is no foreign key relation between Regsitration and profile table Can we achieve an inline of Registration details within Profile object in admin.
Thanks in advance
Upvotes: 0
Views: 880
Reputation: 34573
As far as I know, Django assumes that inline models have a direct relationship to their parent, and you can't do an inline "through" another table. If I'm wrong, someone please correct me.
I would write my own view in this case, as it's going to be easier, imo, than trying to tweak admin to get it to do what you need.
Upvotes: 3