django-galleryfield
Django model fields GalleryField with AJAX form widgets and for multiple images upload with progress bar. This package is NOT about how to elegantly render multiple images in a page, but how to CRUD multiple images in a model field, which makes it possible for easy permission control.
Features
A model field GalleryField, and its formfield GalleryFormField along with the default widget GalleryWidget.
Drag & drop file uploading via AJAX
Uploading multiple images with progress bar
Drag & drop reordering, client / server side crop before/after upload.
Integrates with Django Admin.
Each Image uploaded will be saved in an image model. That might be considered, by some user, a draw back. However, that makes it possible to delete the orphan images from the server (see in FAQ).
ScreenShots
Multiple image upload, sortable
Client/Server side crop
Easy Gallery render
Quick Start
Requirements
Django 3.1 or later
pillow (or PIL)
Install
pip install django-galleryfield
Usage
In settings.py, add 3 lines in you INSTALLED_APP:
INSTALLED_APPS = (
...,
'sorl.thumbnail',
'galleryfield',
...,
)
DJANGO_GALLERY_CONFIG = ...
In urls.py, add the following lines:
from django.urls import include, path
urlpatterns += [path(r"gallery-handler/", include("galleryfield.urls"))]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Run the demo
git clone https://github.com/dzhuang/django-galleryfield.git cd django-galleryfield cd demo pip install -r requirements.txt cd .. python manage.py migrate python manage.py createsuperuser # Create a superuser account so that you can upload images python manage.py runserver
In your browser navigate to http://127.0.0.1:8000/admin, login and navigate to http://127.0.0.1:8000/.
Online documentation
Please visit https://django-galleryfield.readthedocs.io for the documentation.
Contribute to the project
See Contribution guide.
License
Released under the MIT license.
Metadata
Release files for django-galleryfield 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_galleryfield-2.2.0.tar.gz | 539.5 kB | Without provenance | Details for django_galleryfield-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_galleryfield-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for django_galleryfield-2.2.0-py3-none-any.whl |
Total release size: 1.1 MB
Release files / django_galleryfield-2.2.0.tar.gz
| Download URL | django_galleryfield-2.2.0.tar.gz |
|---|---|
| Size | 539.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
981cfbac5442d709176746bf7949ac3edb1132d2c29459edc9bc962e119a89f5
|
|
BLAKE2b-256 checksum How to use checksums |
351498648a4b7786f4db2ad8c1156c3b09ac258d49983c7784ac9fabd9a61514
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / django_galleryfield-2.2.0-py3-none-any.whl
| Download URL | django_galleryfield-2.2.0-py3-none-any.whl |
|---|---|
| Size | 517.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87d48d09135986fd2e22fe4ba9cd38dc9388182a10bba7a0a1943fc4f74bd9f7
|
|
BLAKE2b-256 checksum How to use checksums |
b9448875296baa02d3b641f2dcdc48e61af8a9822fd3f9bb638a5e35a7f0fe66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for django-galleryfield 2.2.0
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.