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 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.1.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.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django_attachment_helpers-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6d971f297554659318ad142c6f0d136788ed7fcd551acdbda9940a98bc09a061
MD5 6dc22739feab805ab0d4d3abf0179b6c
BLAKE2b-256 69f005515950253d46b07d465dc1658fbf2ee18607edaff7a60874e18011c04d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_attachment_helpers-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27e74fd7fa13574c36a3c8586ad63dd48a0c718b2748f93ede2048981c3640d7
MD5 b9601b906444fbddde39e6e54005c074
BLAKE2b-256 5698b7798c48ec65d97ec9827528fdde79f943151807daccb49c96dc0414ca62

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