Skip to main content

Simple Image Uploader Widget for Django-Admin

Project description

django-image-uploader-widget

Introduction

A beautiful image uploader widget for django and django-admin.

Basic Preview

Widget-DarkWidget-Light

Widget-Dark-ImageWidget-Light-Image

Widget Behaviour

Behaviour-DarkBehaviour-Light

Theme Toggle With Django 4.2+

Theme-Toggle

Django-Admin Inline Widget for Multiple Files Handling

Admin-Behaviour-DarkAdmin-Behaviour-Light

Documentation

To understand this package and how to use it you can access the package documentation.

Installing

Install via pip package manager:

pip install django-image-uploader-widget

Add to installed apps, in settings.py:

INSTALLED_APPS = [
    # ...
    'image_uploader_widget',
    # ...
]

Usage

With Admin

# admin.py
from django.contrib import admin
from django.db import models
from image_uploader_widget.widgets import ImageUploaderWidget
from .models import YourModel


@admin.register(YourModel)
class YourModelAdmin(admin.ModelAdmin):
    formfield_overrides = {
        models.ImageField: {'widget': ImageUploaderWidget},
    }

With ModelForm

# forms.py
from django import forms
from image_uploader_widget.widgets import ImageUploaderWidget

class ExampleForm(forms.ModelForm):
    class Meta:
        widgets = {
            'image': ImageUploaderWidget(),
        }
        fields = '__all__'

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-image-uploader-widget-0.4.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-image-uploader-widget-0.4.0.tar.gz.

File metadata

File hashes

Hashes for django-image-uploader-widget-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a01fa1c2d617ab554d825c6ca23db5b944fbd31e8447c4a0518374097b572745
MD5 8f2363a01d36b75818cbf3b7aa81c0eb
BLAKE2b-256 9585cd278baac7aae029cb03721c56ccdf21c8f27402b0793a668c26fd0e79cb

See more details on using hashes here.

File details

Details for the file django_image_uploader_widget-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_image_uploader_widget-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36bd54cc5c43b3d6c28143f61ff738cfe981d20e8d06346896bac7de1e694b00
MD5 b26d67760f1a3d9aafe82b3073bd7200
BLAKE2b-256 2b857a4fa664743e2faeb2a2783e8b2c0490936032441b981d2e7fb96053d1a1

See more details on using hashes here.

Supported by

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