override IMAGE_SIZES

13 views
Skip to first unread message

Vitaly Korenkov

unread,
Oct 26, 2014, 3:43:03 PM10/26/14
to djang...@googlegroups.com
Hi everyone,

any suggestions on how to override IMAGE_SIZES to have your own thumbs sizes?

currently it's set at lfc.setttings.IMAGE_SIZES = ((60, 60), (100, 100), (200, 200), (400, 400), (600, 600), (800, 800))
and I can't find a way to override it.

Thanks,
Vitaly

Vitaly Korenkov

unread,
Oct 26, 2014, 8:38:36 PM10/26/14
to djang...@googlegroups.com
Hi again,

Can I offer a patch for  lfc.models.Image:

class Image(models.Model):
        ... 
        image = ImageWithThumbsField(_(u"Image"), upload_to=settings.LFC_UPLOAD_TO, sizes=settings.LFC_IMAGE_SIZES)
        ...

that will allow a developer to customize sizes and upload folder.

Thanks,
Vitaly

Kai Diefenbach

unread,
Oct 28, 2014, 2:57:50 AM10/28/14
to djang...@googlegroups.com
Hi, 

sounds good to me. Please provide an pull request for that. Keep in mind that you have to also add default settings to settings.py

K.
Reply all
Reply to author
Forward
0 new messages