django-cleanup automatically deletes old file for FileField, ImageField and subclasses,
and it also deletes files on models instance deletion.
**Warning! If you use transactions you may lose you files if transaction will rollback.
If you are concerned about it you need other solution for old file deletion in your project.**
Most django projects I've seen don't use transactions and this app is designed for such projects.
## How does it work?
django-cleanup connects pre_save and post_delete signals to special functions(these functions
delete old files) for each model which app is listed in INSTALLED_APPS above than 'django_cleanup'.
## Installation
pip install django-cleanup
## Configuration
Add django_cleanup to settings.py
INSTALLED_APPS = (
...
'django_cleanup', # should go after your apps
)
**django_cleanup** should be placed after all your apps. (At least after those apps which need to remove files.)
Metadata
Release files for django-cleanup 0.1.10
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-cleanup-0.1.10.tar.gz | 2.5 kB | Without provenance | Details for django-cleanup-0.1.10.tar.gz |
Release files / django-cleanup-0.1.10.tar.gz
| Download URL | django-cleanup-0.1.10.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7582e9eaedfa557b9c48dd3997512670c64aff733378ed1ba734c2ecc6c6ac1b
|
|
BLAKE2b-256 checksum How to use checksums |
7742136c5dbe15af2f1f5a2a133ef8b36b442a1fb88770f0f33e9fc5237ba3a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-cleanup 0.1.10
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.