jimage

Django imagefield with manual thumbnail cropping
Download

jimage Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Yuri Voronkov
  • Publisher web site:
  • https://github.com/websuslik/

jimage Tags


jimage Description

jimage is a Django image field with with manual thumbnail cropping.Instalation- pip install https://github.com/websuslik/jimage/zipball/master- add ‘jimage’ to your installed apps- add url(r'^save_crop/', 'jimage.views.save_crop'), to your urls- Run python manage.py collectstaticSettingsIMAGE_SIZES = { 'square': {'size': (400, 400), 'method': 'crop'}, 'big': {'size': (600, 400), 'method': 'resize'}, ‘anower: {'size': (None, 400), 'method': 'resize'}, # if using ‘resize’ method, you can type only width or height}CONVERT_PATH = ‘/usr/local/bin/convert’ #path to convert tool. Default ‘convert’Usagefrom django.db import modelsfrom jimage.fields import ImageFieldclass Entry(models.Model): image = ImageField(upload_to='image/%Y/%m/%d/')In template< img src=‘{{ object.image.FOO_url }}’ / > Where FOO name of thumbnail in IMAGES_SIZESProduct's homepage


jimage Related Software