Django button plus like in the admin interface when we have foreignkey in class in

in djnago project, I want to create an automatic add button, i see it in admin interface, when we create class in models , django create a plus to add a new element, (this option show when we have foreignkey in the models).

I want to create the same, without coding every time,
example :
I create room, cours, professor, class in model
in the cours model there is professor and class foreignkey.
in the interface I want to create a code that when django found foreignkey, he create a plus button (like in admin interface a plus show when i have foreignkey field, (the plus is a svg file)).
for example I create a domain class in
in the cours class , a domain field is foreignkey with domain class.
so without coding every time I add a class that has a foreignkey django add a button to add data
I may miss explain what I need, but It’s using in django framework admin interface,in django every time we create a foreignkey he create a plus to add data to that field with foreignkey

The plus sign in the admin opens a new browser window with the form to be added. If you look at the link in the icon on an admin page, it’s an icon inside an <a ...> element.

I suggest you read the admin code to see everything going on - but there’s a lot in it that you wouldn’t need to worry about.