@ -8,6 +8,7 @@
media/item_photos/*
media/adminfiles/*
media/cache/*
static/photo_uploads/*
static/item_photos/*
static/adminfiles/*
static/cache/*
@ -3,5 +3,5 @@ from easy_thumbnails.files import get_thumbnailer
def thumbnail(img, size='420x420'):
weight, height = size.split('x')
options = {'size': (int(weight), int(height))}
options = {'size': (int(weight), int(height)), 'background': '#fff'}
return get_thumbnailer(img).get_thumbnail(options)
@ -237,3 +237,8 @@ if DEBUG:
GRAPPELLI_ADMIN_TITLE = 'Батискаф'
GRAPPELLI_SWITCH_USER = True
GRAPPELLI_CLEAN_INPUT_TYPES = False
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.scale_and_crop',
'easy_thumbnails.processors.background',
)