Extended django loaddata command for uploading fixtures
Benefits of using this cli
- Adds the
--insert_onlyflag to the loaddata command, which filters existing database records from the fixture and leaves only new records to insert, thereby preventing overwriting of field values (which may have been changed by the user) in existing records when loaddata is run again. - Adds the
--check_fieldsflag, which performs the same functions as the--insert_onlyflag, but additionally remembers the current fields of the loaded table when the fixture is loaded for the first time, so that when adding a new field to the table and restarting loaddata, only the records from the fixture for these new fields are successfully installed, the old fields will not be changed.
Install
-
Install package
pip install django-loaddata
-
Add app name to
INSTALLED_APPSINSTALLED_APPS = [ 'django_loaddata', ]
-
Run django migrate
python manage.py migrate
Command to run the program:
python manage.py loaddata
Contributing
We would love you to contribute to django-loaddata, pull requests are very welcome! Please see CONTRIBUTING.md for more information.
Metadata
Release files for django-loaddata 0.0.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 |
|---|---|---|---|---|
| django_loaddata-0.0.2.tar.gz | 25.5 kB | With provenance | Details for django_loaddata-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_loaddata-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for django_loaddata-0.0.2-py3-none-any.whl |
Total release size: 40.2 kB
Release files / django_loaddata-0.0.2.tar.gz
| Download URL | django_loaddata-0.0.2.tar.gz |
|---|---|
| Size | 25.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
823880af95bb1c3fa7cde44b187fbe0bb17584d2b1cd44cb9ca79beaa67499bd
|
|
BLAKE2b-256 checksum How to use checksums |
d4d18b9a8f82f6d7ca2f22096651b329739d58f38b147222d029c2e912997a6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 8, 2025.
Transparency logRelease files / django_loaddata-0.0.2-py3-none-any.whl
| Download URL | django_loaddata-0.0.2-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f594ffb70da0a7c2e539ccd44b362515b7b6bd5231a1e852b1f3c7f3354e5430
|
|
BLAKE2b-256 checksum How to use checksums |
a311f55fb5ae90035b4d8bc636d44c139bb0156aad935edb7308e397af9773d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 8, 2025.
Transparency logSecurity for django-loaddata 0.0.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for django_loaddata-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 8, 2025.
Transparency logA 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.