django-swapfield
================
How to
Uses e.g.
Uniform number in sport team.
Race number in an athletic competition.
Any scenario when you want to swap values without reordering.
example
Available fields
SwapIntegerField
Method
Current status allow swap values if not exists unique/unique_together restriction. First, get the registry (if exists) what contains the new value to assign it the old value from registry what currently is saving. When current registry is saved, replace the other registry with old value.
In next versions, other method will be used when exists unique/unique_together restriction.
to-do list
[ ] Two or more django-swapfield in the same object.
[ ] Alternative method when exists unique/unique_together restriction
[ ] Friendly validation error with Django Admin (no Fatal error)
[ ] Abstract django-swap-field
[ ] SwapCharField
[x] Tests for functionality
[ ] Tests for migrations
[ ] Config setting to choose swap value when a new record (not edited) get a value that exists in database: choose the max value +1 or the first available.
Metadata
Release files for django-swapfield 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-swapfield-0.1.1.tar.gz | 7.2 kB | Without provenance | Details for django-swapfield-0.1.1.tar.gz |
Release files / django-swapfield-0.1.1.tar.gz
| Download URL | django-swapfield-0.1.1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e6cd6d4c32d5a0927fa23bf670ebbbc525aa36928b81199c3ac025d23ddfefa
|
|
BLAKE2b-256 checksum How to use checksums |
bef0dcb9ea1d28b43ff2ee1cae6a25c67cad0dc9564f95e508d18fec2f085fc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-swapfield 0.1.1
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.