Skip to main content

django-model-versions

A library for adding version information to models. This version information is then used to prevent concurrent modifications. E.g.

>>> b1 = Blog.objects.get(id=1)
>>> b2 = Blog.objects.get(id=1) # Same row as b1
>>> b1.title = 'Some blog'
>>> b1.save()
>>> b2.title = 'Some other blog'
>>> b2.save()

Will result in a ConcurrentModificationException being raised instead of overriding the data saved by b1.

Usage

Subclass modelversions.VersionedModel instead of django.db.models.Model. That’s it!

Known flaws

objects.update(…) will not increment the version number for objects altered. This would be better as a mixin. object.delete() will not check versioning Django admin hates it

Author

Colin Howe <colin@colinhowe.co.uk> http://www.colinhowe.co.uk - @colinhowe

Metadata

Release files for django-model-versions 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-model-versions 0.4.0
File Size Uploaded Provenance Actions
django-model-versions-0.4.0.tar.gz 3.4 kB Without provenance Details for django-model-versions-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-model-versions 0.4.0
File Interpreter ABI Platform Actions
django-model-versions-0.4.0.linux-x86_64.tar.gz Details for django-model-versions-0.4.0.linux-x86_64.tar.gz

Total release size: 9.0 kB

Release files / django-model-versions-0.4.0.tar.gz

Download URL django-model-versions-0.4.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cd95c438e4e8f832fcab40f4a01496adf0659b51cd15c80fe47975ec94f05902
BLAKE2b-256 checksum
How to use checksums
36f618fec9b1511a0e8ff7bc685e6dfed3abacaff7f29364a2583a1ba33b22fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django-model-versions-0.4.0.linux-x86_64.tar.gz

Download URL django-model-versions-0.4.0.linux-x86_64.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
69764e828f0638d5e5482bdfa3089f1406b16ec01dd3add797083e8e703c7d84
BLAKE2b-256 checksum
How to use checksums
e5e32a1c328ee16dbf5c15573f37a8378959e7fa8b88b0c3ae1505b0cf85dbbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-model-versions 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page