Generic create and delete helpers for Django attachment models
Project description
django-attachment-helpers
Generic create and delete helpers for any Django attachment model.
Install
pip install django-attachment-helpers
Usage
from attachment_helpers import create_attachments, delete_attachments
Create attachments
create_attachments( model=ReportDoc, parent_field="report", parent_instance=report_obj, titles=["Invoice", "Receipt"], docs=[file1, file2], )
Delete attachments
delete_attachments( model=ReportDoc, parent_field="report", parent_instance=report_obj, deleted_ids=["1", "2"], )
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_attachment_helpers-0.1.1.tar.gz.
File metadata
- Download URL: django_attachment_helpers-0.1.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d971f297554659318ad142c6f0d136788ed7fcd551acdbda9940a98bc09a061
|
|
| MD5 |
6dc22739feab805ab0d4d3abf0179b6c
|
|
| BLAKE2b-256 |
69f005515950253d46b07d465dc1658fbf2ee18607edaff7a60874e18011c04d
|
File details
Details for the file django_attachment_helpers-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_attachment_helpers-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27e74fd7fa13574c36a3c8586ad63dd48a0c718b2748f93ede2048981c3640d7
|
|
| MD5 |
b9601b906444fbddde39e6e54005c074
|
|
| BLAKE2b-256 |
5698b7798c48ec65d97ec9827528fdde79f943151807daccb49c96dc0414ca62
|