This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description
django-simplecrop
================

A simple module to crop images in an easy way in Django Administration.


Installation
-----------------------------------
Install ``django-simplecrop`` (or download from [PyPI](http://pypi.python.org/pypi/django-simplecrop/ "Download from PyPI")):

pip install django-simplecrop

Add ``simplecrop`` to ``INSTALLED_APPS`` in ``settings.py``:


INSTALLED_APPS = (
...
'simplecrop',
...
)

Include ``simpleCropAutodiscover()`` after ``admin.autodiscover()``:

...
from simplecrop.utils import simpleCropAutodiscover

admin.autodiscover()
simpleCropAutodiscover()

Include ``simplecrop.urls`` in ``urls.py``:

urlpatterns = patterns('',
...
url(r'^simplecrop/', include('simplecrop.urls')),
)


Usage
------------------


Include the ``__crops__`` parameter in your model and specify the field and image sizes:

class MyModel(models.Model):
__crops__ = [
["image", ["110x110", "200x150"]]
]

title = models.CharField(u"Title", max_length=128)
text = models.TextField("Text")
image = models.ImageField("Image", upload_to="images")


Testing
-----------------
Step 1 - Add image:
![Step 1](http://feliperego.com/img/step1.png "Step 1")

Step 2 - Crop images:
![Step 2](http://feliperego.com/img/step2.png "Step 2")


Template tag
-----------------
Use the template tag `{% thumbnail %}` in your templates:

How to use:

<img name="myimage" src="{% thumbnail ImageObj '100x100' %}" />

\* *This template tag obtains the thumbnail image created when saving in admin. If it does not exist, a new thumbnail with the specified sizes will be created.*

Authors
-----------------

- [Felipe R. Rêgo](https://github.com/feliperrego "GitHub - Felipe R. Rêgo")
- [Silvio Lucena Junior](https://github.com/silviolucenajunior "GitHub - Silvio Lucena")
Release History

Release History

1.0.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-simplecrop-1.0.4.zip (95.8 kB) Copy SHA256 Checksum SHA256 Source Apr 10, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting