Extended django loaddata command for uploading fixtures
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_loaddata-0.0.2.tar.gz.
File metadata
- Download URL: django_loaddata-0.0.2.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
823880af95bb1c3fa7cde44b187fbe0bb17584d2b1cd44cb9ca79beaa67499bd
|
|
| MD5 |
7c8d57b36fc1d05af7672bb0180c240b
|
|
| BLAKE2b-256 |
d4d18b9a8f82f6d7ca2f22096651b329739d58f38b147222d029c2e912997a6f
|
Provenance
The following attestation bundles were made for django_loaddata-0.0.2.tar.gz:
Publisher:
publish-to-pypi.yml on Friskes/django-loaddata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_loaddata-0.0.2.tar.gz -
Subject digest:
823880af95bb1c3fa7cde44b187fbe0bb17584d2b1cd44cb9ca79beaa67499bd - Sigstore transparency entry: 169777061
- Sigstore integration time:
-
Permalink:
Friskes/django-loaddata@e12a77b7708fb2dcf4a5ebc0e538ab338f3abec3 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Friskes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@e12a77b7708fb2dcf4a5ebc0e538ab338f3abec3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_loaddata-0.0.2-py3-none-any.whl.
File metadata
- Download URL: django_loaddata-0.0.2-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f594ffb70da0a7c2e539ccd44b362515b7b6bd5231a1e852b1f3c7f3354e5430
|
|
| MD5 |
d7a23f4fe6f84d3717fb6f007d2380f8
|
|
| BLAKE2b-256 |
a311f55fb5ae90035b4d8bc636d44c139bb0156aad935edb7308e397af9773d6
|
Provenance
The following attestation bundles were made for django_loaddata-0.0.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on Friskes/django-loaddata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_loaddata-0.0.2-py3-none-any.whl -
Subject digest:
f594ffb70da0a7c2e539ccd44b362515b7b6bd5231a1e852b1f3c7f3354e5430 - Sigstore transparency entry: 169777064
- Sigstore integration time:
-
Permalink:
Friskes/django-loaddata@e12a77b7708fb2dcf4a5ebc0e538ab338f3abec3 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Friskes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@e12a77b7708fb2dcf4a5ebc0e538ab338f3abec3 -
Trigger Event:
push
-
Statement type: