pre populate an inline model

Say I have models called station, stationOption. vehicles. In dj admin when I am creating a vehicle I want to select station from a drop down (it is coming by fk) then when I select a station I need to show the options of that station in the page and add say cost to it.

This is really outside the realm of what the built-in admin is designed to do.
See the first two paragraphs at The Django admin site

While it may be possible to build what you are describing, you’re actually going to be better off not trying to do this in the admin.

Do yourself a favor and create a custom view for this.

1 Like