# Dynamically create models

**URL:** <https://forum.djangoproject.com/t/dynamically-create-models/31222>\
**Category:** Using the ORM\
**Created:** [May 16, 2024, 8:21am UTC](https://forum.djangoproject.com/t/dynamically-create-models/31222 "2024-05-16T08:21:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zima](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/zima/32/14619_2.png) [@Zima](https://forum.djangoproject.com/u/Zima)\
**Post date:** [May 16, 2024, 8:21am UTC](https://forum.djangoproject.com/t/dynamically-create-models/31222/1 "2024-05-16T08:21:30Z")

</div>

Is there a sensible way of dynamically creating django models with migrations etc? I would love to hear if anybody used that approach in their app and how it went.

---

<div class="post-metadata">

**Author:** ![leandrodesouzadev](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/leandrodesouzadev/32/8981_2.png) [@leandrodesouzadev](https://forum.djangoproject.com/u/leandrodesouzadev)\
**Post date:** [May 16, 2024, 10:42am UTC](https://forum.djangoproject.com/t/dynamically-create-models/31222/2 "2024-05-16T10:42:21Z")

</div>

Hello there!  
Can you explain a bit more what do you want to achieve with this?

---

<div class="post-metadata">

**Author:** ![charettes](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/charettes/32/27_2.png) [@charettes](https://forum.djangoproject.com/u/charettes)\
**Post date:** [May 16, 2024, 2:45pm UTC](https://forum.djangoproject.com/t/dynamically-create-models/31222/3 "2024-05-16T14:45:09Z")

</div>

I needed this feature a few years back and I built [a third party app to build abstractions around it](https://github.com/charettes/django-mutant).

It is now completely unmaintained with no plan of updating it though, you can read a primer on it [here](https://web.archive.org/web/20200221200924/http://integricho.github.io/2013/07/22/mutant-introduction/)

As for how it went I would say good enough considering the complexity involved. You definitely want to be using Postgres or SQLite if you’re doing such thing but I would strongly suggest you look into alternative options such as using _schemaless_ fields such as `JSONField` instead before venturing down that route.

Best of luck.
