Skip to main content

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 django_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_attachment_helpers-0.1.2.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_attachment_helpers-0.1.2-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file django_attachment_helpers-0.1.2.tar.gz.

File metadata

File hashes

Hashes for django_attachment_helpers-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1739643d9dd03573040b7a5d2864f2f6ecdb3a8cae05a931f76214ff1a7b9e10
MD5 9d85cc5735d126f10a26a2729f2511cb
BLAKE2b-256 db85c1fc9739d6c33cc12a1ae83f7ac326437a431ea69d6bac4f33d7e49c2961

See more details on using hashes here.

File details

Details for the file django_attachment_helpers-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_attachment_helpers-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a916f23eaa70e9df22900e3ab56b350d262240b2cad2581943b3c5cd362e6ecc
MD5 1a435d003530d02884ac197cad7babe5
BLAKE2b-256 c5bb87c93e0933463fc2ecdfceedd123f67078fd0a8cb0b68470c0d9e6abac39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page