# Manage related models on one page - like in django's admin

**URL:** <https://forum.djangoproject.com/t/manage-related-models-on-one-page-like-in-djangos-admin/16010>\
**Category:** Forms & APIs\
**Created:** [September 16, 2022, 4:59pm UTC](https://forum.djangoproject.com/t/manage-related-models-on-one-page-like-in-djangos-admin/16010 "2022-09-16T16:59:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomzoll](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/tomzoll/32/10099_2.png) [@tomzoll](https://forum.djangoproject.com/u/tomzoll)\
**Post date:** [September 16, 2022, 4:59pm UTC](https://forum.djangoproject.com/t/manage-related-models-on-one-page-like-in-djangos-admin/16010/1 "2022-09-16T16:59:19Z")

</div>

Hello. I have 3 models:

```auto
class Person(models.Model):
    name = models.CharField(max_length=50)

class Skill(models.Model):
    skill_name = models.CharField(max_length=100)
    person = models.ForeignKey(Person, on_delete=models.CASCADE, related_name="skills")

class WorkHistory(models.Model):
    company_name = models.CharField(max_length=100)
    person = models.ForeignKey(Person, on_delete=models.CASCADE, related_name="workhistories")

```

In the django’s admin panel I can manage all 3 models on one page:

 ![django](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/5/5cc066a67dada8cf1a620679fe45b1360dcd6124.png)

In the django’s admin panel I can dynamically add or remove related models. Works lovely. But I need to create identical funcionality without using django’s admin panel. Do you know how to do it? I don’t want to reinvent the wheel. I searched the internet, but didn’t find nothing interesting. What are the best practices? Maybe you found any tutorial/solution on the internet?  
Thank you

---

<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 16, 2022, 7:31pm UTC](https://forum.djangoproject.com/t/manage-related-models-on-one-page-like-in-djangos-admin/16010/2 "2022-09-16T19:31:10Z")

</div>

What you’re looking for are Django’s [formsets](https://docs.djangoproject.com/en/4.1/topics/forms/formsets/). They are the facility provided by Django for working with multiple instances of the same form on a single page.

Also, if you’re looking to add / delete instances of that form on a page, you’ll need to write some JavaScript to manage _that_ interaction - unless you’re willing to have each action perform a full-page refresh.

If these are single instances of different models, then you can just include those models on a page. However, I recommend against using any of the Django-provided generic CBVs for this beyond (possibly) `View`. Those views really are intended to be used with a single model and form, and you end up needing to do a lot of work getting them to work with multiple different objects.
