{ "info": { "author": "Alfredo Saglimbeni", "author_email": "alfredo.saglimbeni@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "clean-image-crop-uploader (CICU)\r\n================================\r\n\r\n``clean-image-crop-uploader`` is a django widget to upload an image via Ajax and crop it using `Jcrop\r\n`_. It provides a simple workflow: first one, using modal,\r\n(by `twitter bootstrap `_) the image can be uploaded and croped.\r\nSecond one, you can see the image cropping preview in the form and finally submit the result.\r\n\r\n``clean-image-crop-uploader`` is perfect when you use an ImageField on your model where is necessary to have a specific portion of image. It's easy to configure and to use.\r\nYou can use different configurations , with fixed aspect ratio or minimal image size.\r\n\r\nIt works with jQuery = 1.8.3 and twitter bootstrap.\r\n\r\nScreenshot:\r\n\r\n#. Modal window with upload button:\r\n\r\n.. image:: http://asaglimbeni.github.com/clean-image-crop-uploader/images/screenshot1.jpg\r\n\r\n#. Modal window with crop area:\r\n\r\n.. image:: http://asaglimbeni.github.com/clean-image-crop-uploader/images/screenshot2.jpg\r\n\r\n#. Form with preview\r\n\r\n.. image:: http://asaglimbeni.github.com/clean-image-crop-uploader/images/screenshot3.jpg\r\n\r\nInstallation\r\n------------\r\n\r\n#. Install django-image-cropping using pip. For example::\r\n\r\n pip install clean-image-crop-uploader\r\n\r\n#. Add ``south`` and ``cicu`` to your INSTALLED_APPS.\r\n\r\n#. run migrate commando to your django project::\r\n\r\n\r\n python manage.py migrate\r\n\r\nDependencies\r\n------------\r\n* jQuery = 1.8.3\r\n* Twitter-Bootstrap\r\n\r\nConfiguration\r\n-------------\r\n#. Add into url.py ::\r\n\r\n (r'^ajax-upload/', include('startproject.cicu.urls'))\r\n\r\n#. Create your model-form and set CicuUploaderInput widget to your imageField ::\r\n\r\n from cicu.widgets import CicuUploderInput\r\n\r\n class yourCrop(forms.ModelForm):\r\n class Meta:\r\n model = yourModel\r\n cicuOptions = {\r\n 'ratioWidth': '600', #fix-width ratio, default 0\r\n 'ratioHeight':'400', #fix-height ratio , default 0\r\n 'sizeWarning': 'False', #if True the crop selection have to respect minimal ratio size defined above. Default 'False'\r\n }\r\n widgets = {\r\n 'image': CicuUploderInput(options=cicuOptions)\r\n }\r\n\r\n#. Download `twitter bootstrap `_ to your static file folder.\r\n\r\n#. Add in your form template links to jquery, bootstrap, form.media::\r\n\r\n \r\n ....\r\n \r\n \r\n \r\n {{ form.media }}\r\n\r\n ....\r\n \r\n\r\n\r\nRun the example\r\n---------------\r\nThe Example is available only in github repository: https://github.com/asaglimbeni/clean-image-crop-uploader/tree/master/example\r\n\r\nTo run the example inside this package follow these commands::\r\n\r\n > cd ./example/\r\n > python manage.py syncdb\r\n > python manage.py migrate # only if you use South!!!\r\n > python manage.py collectstatic\r\n > python manage.py runserver domain:8000\r\n\r\nGo to examples :\r\n\r\n#. Free crop : \r\n\r\n#. Fixed aspect ratio: \r\n\r\n#. Fixed aspect ratio with minimal size: ", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/asaglimbeni/clean-image-crop-uploader/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://asaglimbeni.github.com/clean-image-crop-uploader/", "keywords": "django, image, crop, upload, ImageField", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "clean-image-crop-uploader", "package_url": "https://pypi.org/project/clean-image-crop-uploader/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/clean-image-crop-uploader/", "project_urls": { "Download": "https://github.com/asaglimbeni/clean-image-crop-uploader/archive/master.zip", "Homepage": "http://asaglimbeni.github.com/clean-image-crop-uploader/" }, "release_url": "https://pypi.org/project/clean-image-crop-uploader/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "Clean Image Crop Uploader (CICU) provides AJAX file upload and image CROP functionalities for ImageFields with a simple widget replacement in the form. It use Modal from twitter-bootstrap.", "version": "0.2.2" }, "last_serial": 787447, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "1b33a2771a040c7ae5ae9a8600461425", "sha256": "f7bfdd0af4297a9435d9b9662dc798f08c4a7d13e1c01059c07bc2cd77623c83" }, "downloads": -1, "filename": "clean-image-crop-uploader-0.2.1.tar.gz", "has_sig": false, "md5_digest": "1b33a2771a040c7ae5ae9a8600461425", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32604, "upload_time": "2013-02-27T21:15:45", "url": "https://files.pythonhosted.org/packages/28/c5/2d088ef4ec60f83fbe59917c80a84f6114a4e55d8e3d36842213803eab54/clean-image-crop-uploader-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f1c7401b943fbae11bfa096f24c0f684", "sha256": "c713b8534acb46018ec19e6eae5fb67d2c981e8018f016cbcc7658383996765f" }, "downloads": -1, "filename": "clean-image-crop-uploader-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f1c7401b943fbae11bfa096f24c0f684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32740, "upload_time": "2013-03-08T13:45:41", "url": "https://files.pythonhosted.org/packages/66/4c/0fb2ec5245a5523e361411fa6435faa16c3d538007e3ff66f30d2b795588/clean-image-crop-uploader-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f1c7401b943fbae11bfa096f24c0f684", "sha256": "c713b8534acb46018ec19e6eae5fb67d2c981e8018f016cbcc7658383996765f" }, "downloads": -1, "filename": "clean-image-crop-uploader-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f1c7401b943fbae11bfa096f24c0f684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32740, "upload_time": "2013-03-08T13:45:41", "url": "https://files.pythonhosted.org/packages/66/4c/0fb2ec5245a5523e361411fa6435faa16c3d538007e3ff66f30d2b795588/clean-image-crop-uploader-0.2.2.tar.gz" } ] }