Django-Truncate
Django-Truncate is a simple library that will add the ability to empty any given model in any app within your django project, in a more SQL related words it will TRUNCATE the TABLE with a simple command:
python manage.py truncate --apps myapp --models model1 model2
Installation
After you move to your django project main directory follow these simple steps
In your terminal/command line run the following command:
pip install django-truncate
Add “django-truncate” to your INSTALLED_APPS in the settings.py file:
INSTALLED_APPS = [ ... 'django_truncate', ]
And that’s it! you’re now ready to use it.
Usage & Options
You can truncate all of the tables in one app or multiple apps using –apps:
python manage.py truncate --apps appone apptwo
If you want you can truncate a specific table(s) in an app using –models:
python manage.py truncate --apps appone --models Model3
Note if you don’t write the name of the app the truncate will stop and you’ll see an error message in the terminal
Remember you can always see the instructions by running:
python manage.py truncate -h
License
This project is under the BSD License.
Metadata
Release files for django-truncate 0.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-truncate-0.1.tar.gz | 4.3 kB | Without provenance | Details for django-truncate-0.1.tar.gz |
Release files / django-truncate-0.1.tar.gz
| Download URL | django-truncate-0.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6b153145ee898c792bc460031727ddc3518bc7594a58c8935dc4d45c46f06b5
|
|
BLAKE2b-256 checksum How to use checksums |
2156451a87bc8ee084c6600cce91d334cae642c5da2d067b944eb54f816d1f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-truncate 0.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.