# pre populate an inline model

**URL:** <https://forum.djangoproject.com/t/pre-populate-an-inline-model/24089>\
**Category:** The Admin\
**Created:** [September 24, 2023, 11:21am UTC](https://forum.djangoproject.com/t/pre-populate-an-inline-model/24089 "2023-09-24T11:21:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MohiuddinSumon](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/mohiuddinsumon/32/15717_2.png) [@MohiuddinSumon](https://forum.djangoproject.com/u/MohiuddinSumon)\
**Post date:** [September 24, 2023, 11:21am UTC](https://forum.djangoproject.com/t/pre-populate-an-inline-model/24089/1 "2023-09-24T11:21:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [September 25, 2023, 1:32am UTC](https://forum.djangoproject.com/t/pre-populate-an-inline-model/24089/2 "2023-09-25T01:32:09Z")

</div>

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](https://docs.djangoproject.com/en/4.2/ref/contrib/admin/)

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.
