{"categories":[{"label":"Application Frameworks","url":"https://skillfed.io/packages/category/software-development-libraries-application-frameworks/2"}],"enrichment":{"capability":"django-modelcluster extends Django models to work with clusters of related objects in memory before saving to the database, using ParentalKey and ParentalManyToManyField relations.","skillfed_tags":["django-extension","in-memory-relations","draft-state"],"use_cases":["Render a preview of form data before the user confirms and saves the full model cluster to the database.","Build and manipulate a tree of draft models in a multi-step workflow without intermediate database writes.","Construct a temporary cluster of related objects, serialize it to JSON or another format, and send it to an external system.","Create a deep copy of a model and all its child relations using get_all_child_relations introspection.","Handle versioning or revision workflows where models exist in an incomplete state for extended periods."],"what_it_does":"django-modelcluster solves the problem of working with related Django model objects before they exist in the database. Normally, Django foreign keys require both the parent and child records to be saved first; this package introduces ParentalKey and ParentalManyToManyField to hold related objects in memory until the parent is explicitly saved. This is useful for rendering previews of unsaved data, building draft model hierarchies, handling multi-step workflows, or constructing temporary object graphs for serialization or external systems.\n\nThe package extends ClusterableModel as the parent and uses ParentalKey in place of ForeignKey for one-to-many relations, and ParentalManyToManyField for many-to-many relations. Related objects are accessible via a subset of Django's QuerySet API (count, all, add) while in memory, and the entire cluster is persisted to the database in a single save() call. It also provides introspection functions to discover child relations on a model.","worth_installing":"Yes. django-modelcluster is actively maintained, has no known vulnerabilities, carries a permissive license, and solves a real Django limitation with low install friction. It is well-suited for any Django project that needs to work with unsaved model clusters or draft states. The only caveat is verifying that your specific ORM patterns (beyond basic QuerySet operations) are supported."},"id":"django-modelcluster","links":{"html":"https://skillfed.io/packages/django-modelcluster","md":"https://skillfed.io/packages/django-modelcluster.md","pypi":"https://pypi.org/project/django-modelcluster/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-05-01","license_spdx":"BSD-3-Clause","license_treatment":"permissive","name":"django-modelcluster","python_support":"supports_current","summary":"Django extension to allow working with 'clusters' of models as a single unit, independently of the database"},"popularity":{"monthly_downloads":1007619,"position":4521,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"6.5"}
