Django extension to allow working with 'clusters' of models as a single unit, independently of the database
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
- RPM
- python3-django-modelcluster-6.4-1.lbn36.noarch.rpm
- Summary
- Django extension to allow working with 'clusters' of models as a single unit, independently of the database
- URL
- https://pypi.org/project/django-modelcluster
- Group
- Unspecified
- License
- ZPL
- Source
-
python-django-modelcluster-6.4-1.lbn36.src.rpm
- Checksum
- 584a4722cc984dacc0b1b39b0562ecfd31892e0f39cbee86e2d7934fb02c8daf
- Build Date
- 2025/08/27 17:57:01
- Requires
-
python3.10dist(django) >= 4.2
- Provides
-
python-django-modelcluster = 6.4-1.lbn36
python3-django-modelcluster = 6.4-1.lbn36
python3.10-django-modelcluster = 6.4-1.lbn36
python3.10dist(django-modelcluster) = 6.4
python3dist(django-modelcluster) = 6.4
- Obsoletes