Skip to main content

Django Dynamic Image

Description

A django ImageField whose upload_to value is generated from a model method.

Installation

pip install django-dynamic-image

Usage

from django.db import models
from dynamic_image.fields import DynamicImageField

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

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

Download files

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

Source Distribution

django-dynamic-image-1.3.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

django_dynamic_image-1.3.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file django-dynamic-image-1.3.2.tar.gz.

File metadata

  • Download URL: django-dynamic-image-1.3.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for django-dynamic-image-1.3.2.tar.gz
Algorithm Hash digest
SHA256 f8826fdaeee2f0375013ea9703e0f5aa45e1c59dec08478f4f9e992ce8b09788
MD5 4389102ecc5e1c7faf6772117bd36e87
BLAKE2b-256 79fa4357fdc15634de856d811a700982e8041267751ad3d10631da732fb389ec

See more details on using hashes here.

File details

Details for the file django_dynamic_image-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: django_dynamic_image-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for django_dynamic_image-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dcbf985a93aa4a72ae7ab0a412b9a5325c1774254303e6585cee833aabff0a88
MD5 796a59d43be5cc427a7a8b53420ac00d
BLAKE2b-256 a114b6610c2a6314e75190188440a26fa63b4a768718f5f322375acca69dfe13

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.0

2 files

1.3.3

2 files

This release

1.3.2 This release

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

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