tags:

views:

13

answers:

0
from easy_thumbnails.fields import ThumbnailerImageField

class Test(models.Model):
    image = models.ImageField(null=True, blank=True, upload_to="test")
    easy_thumbnail = ThumbnailerImageField(
        null=True, blank=True,
        upload_to="test/easy_thumbnails",
        resize_source=dict(size=(100, 100), crop="smart"),
    )

There's no problems with the "image" field. The image is saved on the file system and the record is created in the DB.

With "easy_thumbnail", the image is well saved on the file system but there's the following error:

IntegrityError: null value in column "storage_id" violates not-null constraint