Skip to main content

django-any-imagefield

This module offers a abstraction over the various image fields, so allow third party applications can provide an imagefield at the project choice.

Supported image fields:

Installation

First install the module, preferably in a virtual environment. It can be installed from PyPI:

pip install django-any-imagefield

Configuration

Add the module to the installed apps:

INSTALLED_APPS += (
    'any_imagefield',
)

Usage

In a Django model, the field can be included:

from django.db import models
from any_imagefield.models import AnyImageField

class Article(models.Model):
    title = models.CharField("Title", max_length=200)
    image = AnyImageField("Image", upload_to='images')

    class Meta:
        verbose_name = "Article"
        verbose_name_plural = "Articles"

    def __unicode__(self):
        return self.title

By default, the AnyImageField displays a standard ImageField with a preview thumbnail. When django-filebrowser-no-grappelli is installed, it will use the FileBrowseField from that package to display the file/image browser. When your package has it’s own ImageField variant/subclass, please consider to add support for it in this package.

Contributing

This module is designed to be generic. In case there is anything you didn’t like about it, or think it’s not flexible enough, please let us know. We’d love to improve it!

If you have any other valuable contribution, suggestion or idea, please let us know as well because we will look into it. Pull requests are welcome too. :-)

Release files for django-any-imagefield 1.1

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

Source distribution (sdist)

Source distribution for django-any-imagefield 1.1
File Size Uploaded
django-any-imagefield-1.1.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-any-imagefield 1.1
File Interpreter ABI Platform
django_any_imagefield-1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 25.9 kB

Release files / django-any-imagefield-1.1.tar.gz

Download URL django-any-imagefield-1.1.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f3cf55d1b269912df2a717479eb1a7508ddae40498325241bec19bdd60e6a0f2
BLAKE2b-256 checksum
How to use checksums
1ded1c09a97658497a649d27ee74d858cd1c084b1ade579a54dae86a4121a9fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.10.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.17

Release files / django_any_imagefield-1.1-py2.py3-none-any.whl

Download URL django_any_imagefield-1.1-py2.py3-none-any.whl
Size 13.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0507d7387ed0fe25546a799d0fd0584e66996e2d8d4b5890426efeb04e2c43ff
BLAKE2b-256 checksum
How to use checksums
e7c2884bd288ac64342b3d010f06dae87a6d1824ed92f51503498fb4db5ef5b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.10.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.17

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files

1.0

2 release files

0.9

2 release files

0.8.2

2 release files

0.8.1

1 release file

0.8.0

1 release file

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