You are here: Home / LBN / Up2date / Business / BastionLinux 36 / python3-django-modelcluster-6.4-1.lbn36.noarch

python3-django-modelcluster-6.4-1.lbn36.noarch

Package Attributes
RPM  python3-django-modelcluster-6.4-1.lbn36.noarch.rpm Architecture  noarch Size  172795 Created  2025/08/27 10:54:22 UTC
Package Specification
Summary Django extension to allow working with 'clusters' of models as a single unit, independently of the database
Group Unspecified
License ZPL
Home Page https://pypi.org/project/django-modelcluster
Description

If you had a data model like this: class Band(models.Model): name = models.CharField(max_length=255)

class BandMember(models.Model): band = models.ForeignKey(Band, related_name=members, on_delete=models.CASCADE) name = models.CharField(max_length=255) wouldn’t it be nice if you could construct bundles of objects like this, independently of the database: beatles = Band(name=The Beatles) beatles.members = [ BandMember(name=John Lennon), BandMember(name=Paul McCartney), ] Unfortunately, you can’t. Objects need to exist in the database for foreign key relations to work: IntegrityError: null value in column "band_id" violates not-null constraint But what if you could? There are all sorts of scenarios where you might want to work with a ‘cluster’ of related objects, without necessarily holding them in the database: maybe you want to render a preview of the data the user has just submitted, prior to saving. Maybe you need to construct a tree of things, serialize

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PayloadIsZstd)  
rpmlib(CompressedFileNames)  
rpmlib(PartialHardlinkSets)  
rpmlib(FileDigests)  
Provides
python-django-modelcluster
python3-django-modelcluster
python3.10-django-modelcluster
python3.10dist(django-modelcluster)
python3dist(django-modelcluster)
Obsoletes
python-django-modelcluster

Document Actions