pyclean图像裁剪上载程序(pycicu)使用金字塔提供ajax文件上载和图像裁剪功能。它使用来自twitter引导的modal。这是一个叉子干净的图像作物上传。
pycicu的Python项目详细描述
#是的。待办事项:将此自述文件调整为新项目。现在它需要很多包,将来我们打算将它们减少到最低限度。
============================================================================================图片::https://d2weczhvl823v0.cloudfront.net/asaglimmeni/django datetime widget/trend.png
:目标:https://bitdeli.com/free
图片::https://pypip.in/v/pycicu/badge.png
:目标:https://crate.io/packages/pycicu
…image::https://pypip.in/d/pycicu/badge.png
:target:https://crate.io/packages/pycicu
``pycicu``是一个通过ajax上传图像并使用'jcrop
<;https://github.com/tapmodo/jcrop>;``裁剪图像的工具。它提供了一个简单的工作流程:第一个,使用modal,
(通过'twitter bootstrap<;http://twitter.github.com/bootstrap/javascript.html modals>;``),可以上传和裁剪图像。
第二个,您可以在表单中看到图像裁剪预览,并最终提交结果。
``pycicu``在您必须上载图像并且必须具有图像的特定部分时是完美的。
它将易于配置和使用。
您可以使用不同的配置,具有固定的长宽比或最小的图像大小。
它与jquery=1.8.3和twitter引导一起工作。
屏幕截图:
。带上传按钮的模式窗口:
…图片:http://asaglimmeni.github.com/clean image crop uploader/images/screenshot1.jpg
带作物面积的模式窗口:
…图片:http://asaglimmeni.github.com/clean-image-crop-uploader/images/screenshot2.jpg
\带预览的表单
…图片::http://asaglimmeni.github.com/clean-image-crop-uploader/images/screenshot3.jpg
使用PIP安装。例如:
>pip install pycicu
>依赖性
-
-
>*jquery=1.8.3
*twitter bootstrap
*枕头>;=1.5
*deform>;=2.0a2
*colander>;=1.0b1
*金字塔变色龙>;=0.1
*sqlalchemy>;=0.8.3
配置
----
。添加到url.py::
(r“^ajax upload/”,include('startproject.cicu.url')
。创建模型窗体并将cicuuploaderinput小部件设置为imagefield::
from cicu.widgets import cicuuploaderinput
class yourcrop(forms.model form):
class meta:
model=yourmodel
cicuoptions={
'ratio width':'600',固定宽度比,默认值0
“ratio height”:“400”,“fix height ratio”,默认值0
“sizewarning”:“false”,如果为true,则裁剪选择必须遵守上面定义的最小比率大小。默认“false”
}
widgets={
“image”:cicuuploaderinput(options=cicuoptions)
}
。将“twitter bootstrap<;http://twitter.github.com/bootstrap/>;``下载到静态文件文件夹中。
。在表单模板中添加指向jquery、bootstrap、form.media的表单模板链接指向jquery、bootstrap、form.media:
<;head>;
。
。
。
。
<;script src=“https://ajax.gogleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”>;
<;lt;lt;lt;
<;lt;lt;lt;
>;
<;lt;lt;lt;lt;lt;script src={{{
。
<;lt;lt;lt;lt;scriptsrc一静态url}js/bootstrap.js“>;
{{form.media}
…
<;{head>;
#只有你用南方!!!
>;python manage.py collectstatic
>;python manage.py runserver域:8000
转到示例:
。免费裁剪:<;http://domain:8000/cicu freecorp/>;
。修正了spect比率:<;http://domain:8000/cicu fixedratio/>;
。最小大小的固定纵横比:<;http://domain:8000/cicu warningsize/>;
:目标:https://bitdeli.com/free
图片::https://pypip.in/v/pycicu/badge.png
:目标:https://crate.io/packages/pycicu
…image::https://pypip.in/d/pycicu/badge.png
:target:https://crate.io/packages/pycicu
``pycicu``是一个通过ajax上传图像并使用'jcrop
<;https://github.com/tapmodo/jcrop>;``裁剪图像的工具。它提供了一个简单的工作流程:第一个,使用modal,
(通过'twitter bootstrap<;http://twitter.github.com/bootstrap/javascript.html modals>;``),可以上传和裁剪图像。
第二个,您可以在表单中看到图像裁剪预览,并最终提交结果。
``pycicu``在您必须上载图像并且必须具有图像的特定部分时是完美的。
它将易于配置和使用。
您可以使用不同的配置,具有固定的长宽比或最小的图像大小。
它与jquery=1.8.3和twitter引导一起工作。
屏幕截图:
。带上传按钮的模式窗口:
…图片:http://asaglimmeni.github.com/clean image crop uploader/images/screenshot1.jpg
带作物面积的模式窗口:
…图片:http://asaglimmeni.github.com/clean-image-crop-uploader/images/screenshot2.jpg
\带预览的表单
…图片::http://asaglimmeni.github.com/clean-image-crop-uploader/images/screenshot3.jpg
使用PIP安装。例如:
>pip install pycicu
>依赖性
-
-
>*jquery=1.8.3
*twitter bootstrap
*枕头>;=1.5
*deform>;=2.0a2
*colander>;=1.0b1
*金字塔变色龙>;=0.1
*sqlalchemy>;=0.8.3
配置
----
。添加到url.py::
(r“^ajax upload/”,include('startproject.cicu.url')
。创建模型窗体并将cicuuploaderinput小部件设置为imagefield::
from cicu.widgets import cicuuploaderinput
class yourcrop(forms.model form):
class meta:
model=yourmodel
cicuoptions={
'ratio width':'600',固定宽度比,默认值0
“ratio height”:“400”,“fix height ratio”,默认值0
“sizewarning”:“false”,如果为true,则裁剪选择必须遵守上面定义的最小比率大小。默认“false”
}
widgets={
“image”:cicuuploaderinput(options=cicuoptions)
}
。将“twitter bootstrap<;http://twitter.github.com/bootstrap/>;``下载到静态文件文件夹中。
。在表单模板中添加指向jquery、bootstrap、form.media的表单模板链接指向jquery、bootstrap、form.media:
<;head>;
。
。
。
。
<;script src=“https://ajax.gogleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js”>;
<;lt;lt;lt;
<;lt;lt;lt;
>;
<;lt;lt;lt;lt;lt;script src={{{
。
<;lt;lt;lt;lt;scriptsrc一静态url}js/bootstrap.js“>;
{{form.media}
…
<;{head>;
#只有你用南方!!!
>;python manage.py collectstatic
>;python manage.py runserver域:8000
转到示例:
。免费裁剪:<;http://domain:8000/cicu freecorp/>;
。修正了spect比率:<;http://domain:8000/cicu fixedratio/>;
。最小大小的固定纵横比:<;http://domain:8000/cicu warningsize/>;