title: Add a foreign key object within parent form in Django
body: <p>I am writing a project for studies in which I have a ModelForm based on a model that contains several foreign keys. In this case I need to also add new foreign keys while setting a content for my new object. For example: I am adding a new medicine X that has a producer field (with options: A, B, C) and I want to instantly add a new producer (D) and use it as a producer of medicine that is being created (so the D is a producer of the medicine X). This is exactly what the admin panel provides. I found a <a href="https://stackoverflow.com/questions/28068168/django-adding-an-add-new-button-for-a-foreignkey-in-a-modelform">topic covering a widget</a> that does it, but I had no luck implementing it. I also found <a href="https://github.com/AndrewIngram/django-extra-views" rel="nofollow noreferrer">django extra views</a>, but the documentation is very dry and since I am very new to django and MVC architecture I don't know how to use it.
  Did anybody have an experience using any of the mentioned above?</p>