mauler / django-jcrop

Django app that provides a crop field using http://deepliquid.com/content/Jcrop.html, no futher configuration needed.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django-jcrop

Test Status

Code Health

Latest PyPI version

Number of PyPI downloads

This a prototype, the code is working but not ideally (black magic present).

Installation

pip install django-jcrop

Configuration

Put 'easy_thumbnails' and 'sorl.thumbnail' on your INSTALLED_APPS settings.

INSTALLED_APPS = [
    '...',
    'sorl.thumbnail',
    'django_jcrop',
    '...',
]

Models

from django_jcrop.models import JCropImageField

class MyModel(models.Model):
    image = JCropImageField(blank=True)

Admin usage

Go to model edit view and see the crop feature, select an area:

First step

And save:

Second step

About

Django app that provides a crop field using http://deepliquid.com/content/Jcrop.html, no futher configuration needed.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 77.5%Language:Python 15.4%Language:CSS 7.1%