skip to navigation
skip to content

pycicu 0.1.5

PyClean Image Crop Uploader (pycicu) provides AJAX file upload and image CROP functionalitiesusing Pyramid. It uses Modal from twitter-bootstrap. This is a fork of clean-image-crop-uploader.

Latest Version: 0.1.6

#. TODO: Adjust this README to the new project. Right now it demands a lot of packages, in the future we intend to reduce them to a minimum.

py-clean-image-crop-uploader (pyCICU)
.. image::
.. image::
.. image::

``pycicu`` is a tool to upload an image via Ajax and crop it using `Jcrop
<https:"" tapmodo="" jcrop="">`_. It provides a simple workflow: first one, using modal,
(by `twitter bootstrap <http:"" bootstrap="" javascript.html#modals="">`_) the image can be uploaded and cropped.
Second one, you can see the image cropping preview in the form and finally submit the result.

``pycicu`` is perfect when you have to upload images and it's necessary to have a specific portion of image.
It'll be easy to configure and to use.
You can use different configurations, with fixed aspect ratio or minimal image size.

It works with jQuery = 1.8.3 and twitter bootstrap.


#. Modal window with upload button:

.. image::

#. Modal window with crop area:

.. image::

#. Form with preview

.. image::


#. Install using pip. For example::

pip install pycicu

* jQuery = 1.8.3
* Twitter-Bootstrap

* Pillow >= 1.5
* deform >= 2.0a2
* colander >= 1.0b1
* pyramid_chameleon >= 0.1
* SQLAlchemy >= 0.8.3

#. Add into ::

(r'^ajax-upload/', include('startproject.cicu.urls'))

#. Create your model-form and set CicuUploaderInput widget to your imageField ::

from cicu.widgets import CicuUploaderInput

class yourCrop(forms.ModelForm):
class Meta:
model = yourModel
cicuOptions = {
'ratioWidth': '600', #fix-width ratio, default 0
'ratioHeight':'400', #fix-height ratio , default 0
'sizeWarning': 'False', #if True the crop selection have to respect minimal ratio size defined above. Default 'False'
widgets = {
'image': CicuUploaderInput(options=cicuOptions)

#. Download `twitter bootstrap <http:"" bootstrap=""/>`_ to your static file folder.

#. Add in your form template links to jquery, bootstrap,

<script src=""></script>
<link href="{{ STATIC_URL }}css/bootstrap.css" rel="stylesheet" type="text/css"/>
<script src="{{ STATIC_URL }}js/bootstrap.js"></script>
{{ }}


Run the example

To run the example inside this package follow these commands::

> cd ./example/
> python syncdb
> python migrate # only if you use South!!!
> python collectstatic
> python runserver domain:8000

Go to examples :

#. Free crop : <http: domain:8000="" cicu-freecrop=""/>

#. Fixed aspect ratio: <http: domain:8000="" cicu-fixedratio=""/>

#. Fixed aspect ratio with minimal size: <http: domain:8000="" cicu-warningsize=""/>  
File Type Py Version Uploaded on Size
pycicu-0.1.5.tar.gz (md5) Source 2014-01-27 37KB
  • Downloads (All Versions):
  • 1 downloads in the last day
  • 235 downloads in the last week
  • 1316 downloads in the last month