Can't get the crop of a FilerImageField

201 views
Skip to first unread message

Karim Gorjux

unread,
Aug 2, 2013, 11:46:55 AM8/2/13
to django...@googlegroups.com
Hi all , I created my own plugin and in my model I use a FilerImageField, but when I use it on the template I can get the url easily with {{ image.url }} but I can't crop it.

{%load thumbnail%}
<img src="{% thumbnail image 1200x400 crop %}" />

This code doesn't work and image in my model is a FilerImageField

Thanks

Stefan Foulis

unread,
Aug 3, 2013, 8:48:16 AM8/3/13
to django...@googlegroups.com
The code you provided seems correct.
Do thumbnails work elsewhere (e.g in admin or with cmsplugin_filer_image)?
Are you using the default Storage backend?

Karim Gorjux

unread,
Aug 4, 2013, 4:47:41 AM8/4/13
to django...@googlegroups.com

2013/8/3 Stefan Foulis <ste...@foulis.ch>

The code you provided seems correct.
Do thumbnails work elsewhere (e.g in admin or with cmsplugin_filer_image)?
Are you using the default Storage backend?

Thanks for the answer. I just move the website and now after some check I noted that when I upload an image I get "undefined" in django-filer. I thought was pillow the problem, I installed it again with pip and I get

    --------------------------------------------------------------------                                                                                                                                                             [29/1019]
    version      Pillow 2.1.0
    platform     linux2 2.7.3 (default, Apr 10 2013, 06:20:15)
                 [GCC 4.6.3]
    --------------------------------------------------------------------
    *** TKINTER support not available
    (Tcl/Tk 8.5 libraries needed)
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    *** TIFF G3/G4 (experimental) support not available
    --- FREETYPE2 support available
    *** LITTLECMS support not available
    *** WEBP support not available
    --------------------------------------------------------------------

So seems that pillow is ok

Als the default storage is enabled in the STATICFILES_FINDERS. How I can debug this problem? I don't have any clue about where django-filer is failing.

Thanks!

--
Karim Gorjux

Karim Gorjux

unread,
Aug 4, 2013, 10:42:48 AM8/4/13
to django...@googlegroups.com
I'm digging on it. The problem is I move the website from webfaction to djangoeurope. I got this problem on the admin panel when I try to upload a picture

############

POST /admin/filer/clipboard/operations/upload/?qqfile=IMG-20130619-WA0000.jpg 500 (Internal Server Error) fileuploader.js:1220
qq.extend._upload fileuploader.js:1220
qq.UploadHandlerAbstract.upload fileuploader.js:908
qq.FileUploaderBasic._uploadFile fileuploader.js:413
qq.FileUploaderBasic._uploadFileList fileuploader.js:404
qq.FileUploaderBasic._onInputChange fileuploader.js:388
qq.UploadButton.onChange fileuploader.js:325
(anonymous function)

GET /en/admin/filer/folder/4/list/undefined/ 404 (Not Found) jquery.min.js:112
c.extend.clean jquery.min.js:112
sa jquery.min.js:20
c.fn.extend.domManip jquery.min.js:109
c.fn.extend.append jquery.min.js:103
c.fn.extend.html jquery.min.js:107
qq.FileUploaderBasic.onComplete /en/admin/filer/folder/4/list/:139
qq.(anonymous function).onComplete fileuploader.js:349
qq.extend._onComplete fileuploader.js:1246
xhr.onreadystatechange

############

I check the pillow library and seems to be correct. I had a similar problem few months ago (https://github.com/stefanfoulis/django-filer/issues/257) and I solved it installing the correct libraries on my personal server. Now I have to face with Django Europe hosting service and my hands are tied ;-)

Just I would like to understand where I can find more info about the problem I had. I already set FILER_DEBUG = True.

Thanks
--
Karim Gorjux

Karim Gorjux

unread,
Aug 4, 2013, 2:03:26 PM8/4/13
to django...@googlegroups.com
Solved!

Was just a problem with the version of the libraries. I checked all the versions and reinstall and now works. 

Thanks for the support.
--
Karim Gorjux
Reply all
Reply to author
Forward
0 new messages