remotes/origin/artem
Gena 11 years ago
parent ab4b3d0f19
commit e760f4ec29
  1. 1
      .gitignore
  2. 2
      batiskaf/jinja2_ext/thumbnails.py
  3. 5
      batiskaf/settings.py

1
.gitignore vendored

@ -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',
)

Loading…
Cancel
Save