Django ImageKit dont save or generate thumbnail

112 views
Skip to first unread message

wilson coronado

unread,
Apr 14, 2015, 7:38:29 PM4/14/15
to django-...@googlegroups.com
i have a doubt. the library when used in the model generates another field in the database or generated when using the ImageSpecField field ()

because when I add the field according to the manual I do not get anything no image is generated, and no change appears in the database

my model is like this

from django.db import models
from imagekit.models import ImageSpecField, ProcessedImageField
from imagekit.processors import ResizeToFill, SmartResize

class grupo(models.Model):
    flayer
= models.ImageField(upload_to='static/media/flayers/')
    flayer_
thumbnail = ImageSpecField(source='flayer',
                                      processors
=[ResizeToFill(50, 50)],
                                      format
='JPEG',
                                      options
={'quality': 60})

   


Reply all
Reply to author
Forward
0 new messages