photologue

Django-imagekit: how to reduce image quality with a preprocessor_spec?

南楼画角 提交于 2019-12-11 04:39:57
问题 I've created this simple model class, with a Preprocessor to reduce my photos'quality (the photos'extension is .JPG): from django.db import models from imagekit.models import ImageModel from imagekit.specs import ImageSpec from imagekit import processors class Preprocessor(ImageSpec): quality = 50 processors = [processors.Format] class Picture(ImageModel): image = models.ImageField(upload_to='pictures') class IKOptions: preprocessor_spec = Preprocessor The problem : pictures' quality are not

Django Photologue Upload Photo Example

泄露秘密 提交于 2019-12-11 04:38:52
问题 I've installed Django-Photologue and I can upload files and create galleries in my Django admin site. I've been searching the documentation below for examples on how to create a photo upload form so my users can create a gallery on my site but can't find a simple example to get me started. I've also setup their example application but it wasn't very helpful in terms of how to upload and create Galleries by POSTing from Views/Templates. Docs: https://django-photologue.readthedocs.org/en/2.7/