Skip to main content

Dynamic Upload Image Field

Description

A django ImageField that generates it's upload_to value from the model instance method get_upload_to.

Installation

pip install dynamic-upload-image-field

or

pipenv install dynamic-upload-image-field

Usage

from django.db import models
from dynamic_upload_image_field.fields import DynamicUploadImageField

class ExampleModel(models.Model):
    name = models.CharField(max_length=56)
    image = DynamicUploadImageField()

    def get_upload_to(self, field_name):
        class_name = self.__class__.__name__.lower()
        instance_name = self.name
        return "{}/{}".format(class_name, instance_name)

Metadata

Release files for dynamic-upload-image-field 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dynamic-upload-image-field 0.1.2
File Size Uploaded Provenance Actions
dynamic_upload_image_field-0.1.2.tar.gz 6.0 kB Without provenance Details for dynamic_upload_image_field-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dynamic-upload-image-field 0.1.2
File Interpreter ABI Platform Actions
dynamic_upload_image_field-0.1.2-py3-none-any.whl Python 3 none any Details for dynamic_upload_image_field-0.1.2-py3-none-any.whl

Total release size: 8.6 kB

Release files / dynamic_upload_image_field-0.1.2.tar.gz

Download URL dynamic_upload_image_field-0.1.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aa9e27fe343becfafd966ce0ce45a4f0ffb9e94b2b997392595558a858ca9032
BLAKE2b-256 checksum
How to use checksums
c13852e56feff7ec2dcdedcb02ad0a3f47d6f2227290418087466875b68aac73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Release files / dynamic_upload_image_field-0.1.2-py3-none-any.whl

Download URL dynamic_upload_image_field-0.1.2-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb7ec3e1a2e2c64bcbf85524c7afac62eda8ee8151f221544c5c951c40a16872
BLAKE2b-256 checksum
How to use checksums
166b888f029a8e719935295fdcd01aaf2c071ed4e96305510c52ff62463437ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

Security for dynamic-upload-image-field 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page