开发者

using django-easy_thumbnails from view

easy_thumbnails is a big help when making models or views for thumbnails. 开发者_高级运维

I am using the templatetag (via template, not via model) and easy_thumbnails creates sucessfully the thumbnail files.

what happen when I want to use easy_thumbnails via view, not model o templatetag (the rendering of the images is via ajax, and django will not parse the templatetag...) for example imagine displaying infinite image thumbnails for this plugin http://sorgalla.com/projects/jcarousel/examples/dynamic_ajax_php.html . any lights? thanks!.


I'm not sure what you're asking about, but README file from easy_thumbnails should cover your use case. And if for some reason it doesn't and you want to use {% thumbnail %} tag directly in a view, then you can always render_to_string a template that contains just: {% thumbnail %} tag, although this looks to me like a hack.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜