跳转到主要内容

Django图片上传和裁剪工具

项目描述

django-cropduster 是一个项目,它提供了一个使用 Jcrop jQuery 插件 的表单字段。它是 django 的 ImageField 的直接替代品,允许用户从图片中生成多个裁剪版本,使用预定义的大小和宽高比。 django-cropdusterThe Atlantic 的发展人员创建。它与 python 2.7 和 3.4 以及 Django 版本 1.4 - 1.8 兼容。

安装

安装 django-cropduster 的推荐方法是使用 PyPI

pip install django-cropduster

或者,可以从源码安装 django-cropduster 的开发版本

pip install -e git+git://github.com/theatlantic/django-cropduster.git#egg=django-cropduster

如果源码已经检出,使用 setuptools

python setup.py develop

配置

要启用 django-cropduster,必须在 settings.py 的 INSTALLED_APPS 中添加 "cropduster",并且您必须将 "cropduster.urls" 包含在您的 django urlpatterns 中。

# settings.py

INSTALLED_APPS = (
    # ...
    'cropduster',
)

# urls.py

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

许可证

django 代码根据 简化版 BSD 许可证 许可。查看根目录下的 LICENSE 文件以获取完整的许可和版权信息。

包含的 Jcrop jQuery 库是根据 MIT 许可证使用的。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪一个,请了解有关 安装软件包 的更多信息。

源代码分发

django-cropduster-4.14.4.tar.gz (144.8 kB 查看哈希值)

上传时间 源代码

构建分发

django_cropduster-4.14.4-py3-none-any.whl (172.5 kB 查看哈希值)

上传时间 Python 3

由以下支持