问题标签 [easy-thumbnails]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 如果宽度超过“x”值,则调整原始源的大小(django + easy-thumbnails)
当尺寸大于 x 值时,我正在尝试调整原始源(ThumbnailerImageField 对象)的大小。在我必须进行我不知道如何完成的调整大小之前,一切都可以。
这是我的代码:
非常感谢 !!!!
django - 在 Django 中迁移 easy_thumbnails 从 1.6.7 升级到 1.7.1
我正在尝试从 Django 1.6.7 升级到 1.7.1
但是,在我的本地virtualenv
和我自己的所有 Django 应用程序(新的适用于这些应用程序migrate
)中升级 Django 版本后,我无法让应用程序(2.2 版)工作。这个版本应该与 Django 1.7 中的新迁移系统(post South)一起正常工作(此处的说明)。migrate
easy_thumbnails
据我所知,原因是easy_thumbnails
应用程序中的第二次迁移正在尝试重新创建迁移(源代码here)。
但是很自然,由于这个代码是包作者故意放在那里的,恐怕我自己做错了什么。
任何想法这是什么原因?
完整的堆栈跟踪:
django - Heroku syncdb 由于easy_thumbnail而失败
每次我尝试使用 Heroku 部署我的应用程序时都会遇到相同的错误
我的应用程序在 Django 本地运行得很好,但是由于我将它移动到 heroku 上部署它,所以我收到了这个错误
我的 github 可以在https://github.com/henrigeek/Django找到
谢谢你的帮助
django - 使用 AJAX 上传图像,裁剪我们选择的部分,并保存在 django admin 中
我需要为管理员提供上传图像以ImageField
使用 AJAX 的功能,然后裁剪他选择的部分(使用预定义的尺寸比或分辨率),然后将裁剪后的图像保存在数据库中。
我试过django-image-cropping
了django-ajaximage
。
虽然django-ajaximage
使用 AJAX 上传图像,但它不允许管理员选择要裁剪的图像的哪一部分,裁剪django-image-cropping
图像分两步:首先我们需要上传图像,将其保存到数据库,然后我们需要再次打开对象并选择裁剪部分,然后将其再次保存到数据库中,我觉得这不必要地麻烦。有什么建议么?
django - 如何检索通过 django-filer easy-thumbnails 生成的缩略图的绝对 URL
我正在使用以下模板标签在我的模板中显示缩略图
缩略图模板标签按预期返回缩略图文件的相对 URL。但我希望它返回绝对网址。通常,easy-thumbnails 具有 THUMBNAIL_MEDIA_URL = '' 设置,它允许缩略图的存储构建绝对 url,但它不适用于 django-filer。
还有其他方法可以实现我想要的吗?
django - 在 django 中使用简单的缩略图指定文件名后缀
我正在使用 django 中的 easy-thumbnails 库来创建缩略图。但是,我不知道如何覆盖缩略图命名过程。目前,lib 正在将缩略图大小附加到文件名,但我想指定一个自定义名称,例如 _large。请问这怎么做?
android - Upload photo from Android device to Django backend and save it to database
I have to upload an image from Android device to a web app written in Python and Django. For storing images, I have made use of easy thumbnails.
What I have done so far is convert the image to base64 string to and post it to server. Well this is working perfectly, also if I write the base64 string to png image file it goes smoothly.
Now, I want to save it to the database as far as I know, easy thumbnails save the actual file to some location on server within the app file structure, and saves a link to same in database.
I am not understanding, how do I save the base64 string I receive in POST to my database.
My Model:
django - django easy-thumbnails 的异步缩略图
我已经安装了 django easy-thumbanils 2.2。到目前为止它运行良好,但我决定使其异步以提高性能。按照文档,我实现了以下代码:
模型.py
任务.py
为什么要调用 add 任务而不是 generate_thumbnails 任务?
django - Django jpg 缩略图生成在生产中被阻止
我正在使用简单的缩略图为上传的图像生成缩略图。在开发环境中,为 png 和 jpg 文件正确生成缩略图并上传到 S3。但是,在生产中,只会生成 png 图像的缩略图,而不是 jpg。我不知道为什么-请帮忙?
设置
- Ubuntu 14.04
- nginx
- django 1.7.5 & Python 2.7
更新
遵循 Mark Galloway 的出色建议,我安装了 Pillow 文档中建议的要求:
然后重新安装枕头:
最后,为了更好地重新启动 gunicorn。
django - 不会为带有大写扩展名的图像生成简易缩略图
我正在使用最新版本的easy-thumbnails,它工作得很好,除了当用户尝试上传带有大写扩展名的图像(例如image.JPG)时,不会生成任何缩略图。我已经确认我只是将 JPG 更改为 jpg,一切正常。请问如何解决这个问题?
更新
作为临时解决方法,我在模型上编写了一个重命名函数,将扩展名更改为小写。