Dj-Snake
Installing fixtures with django’s loaddata command overrides objects with the same primary key. While this is not a problem if you are installing the fixtures against a fresh DB with no data but in case you have existing data then loading the fixture can be problematic as all the existing rows with the same primary key will be updated with the new data from the fixture(s) Using djloaddata to install fixture ensures that no existing rows will be touched and all the objects will only be inserted while preserving all the relations between model objects.
Requirements
Python 3.6 to 3.10 supported.
Django 2.2 to 4.0 supported.
Installation
First, install with pip:
python -m pip install dj-snake
Second, add the app to your INSTALLED_APPS setting:
INSTALLED_APPS = [
...,
"dj_snake",
...,
]
The app adds a new management command named djloaddata.
Usage
python manage.py djloaddata fixture [fixture ...]
Metadata
Release files for dj-snake 1.1.2
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 |
|---|---|---|---|---|
| dj-snake-1.1.2.tar.gz | 7.4 kB | Without provenance | Details for dj-snake-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dj_snake-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for dj_snake-1.1.2-py3-none-any.whl |
Total release size: 14.1 kB
Release files / dj-snake-1.1.2.tar.gz
| Download URL | dj-snake-1.1.2.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33ff7c4915b7482f7becfcf32a5b0a6cb5f85c307ecfb935ff6bef62a52fb3c8
|
|
BLAKE2b-256 checksum How to use checksums |
2865fce3a61bf789ab9eb7b6e93d6027471859a865ea6a54b7a4b76ef67e92d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / dj_snake-1.1.2-py3-none-any.whl
| Download URL | dj_snake-1.1.2-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b39db68d45d3beb36624a31ac8d8187189b247b5a27a1df629ee98ae710d0409
|
|
BLAKE2b-256 checksum How to use checksums |
0a83b16e6d674f003858507910ab466149df97c2ba91d3abc511f03663993453
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Security for dj-snake 1.1.2
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.