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.6.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for django-image-uploader-widget-0.4.6.tar.gz
Algorithm Hash digest
SHA256 e5bace4daca757111be814df74f90819134ae3047abc33a569315d2454d0d1d2
MD5 3a2c02d8e3218a61bc5631db6da7532e
BLAKE2b-256 15808d87a5f6327d213227cc6a2b9daf26a5497368116b9832c9378d4e15447f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_image_uploader_widget-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0014b0e5967d321257c665e7e32f7f712ac7feda878307ec0dde66a41742d4c0
MD5 81e22357d9a3fb09467b1d62b2028829
BLAKE2b-256 3946d47597eb0b03c032d9a9cfb200bf3b533247c7a8f48b4c7dc45140214ca2

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