Problem with gallery

9 views
Skip to first unread message

Torvald Bringsvor

unread,
Jan 17, 2011, 7:40:48 AM1/17/11
to django-lfc
Hi

I have installed LFC 1.0.2. It works quite well, but I have a problem with the gallery. When I upload an image it seems to work, but the image can not be viewed.

I see in the server log that I get 404 errors because files like the image filename + image size doesn't work, and they are not present in the media/uploads directory either:

/media/uploads/IMAG0124.60x60.jpg
/media/uploads/IMAG0126_.200x200.jpg

etc.

Like many Django applications I have seen there seems to be no obvious place to look for errors, so I am a bit stuck.

Is there something I have missed, or is there somewhere to find out more about what causes this error?

-Torvald

 
Torvald Baade Bringsvor, Skogvegen 13B, N-1406 Ski


Kai Diefenbach

unread,
Jan 18, 2011, 12:31:24 AM1/18/11
to djang...@googlegroups.com
Hi,

Am 17.01.2011 um 13:40 schrieb Torvald Bringsvor:

I have installed LFC 1.0.2. It works quite well, but I have a problem with the gallery. When I upload an image it seems to work, but the image can not be viewed.

I see in the server log that I get 404 errors because files like the image filename + image size doesn't work, and they are not present in the media/uploads directory either:

/media/uploads/IMAG0124.60x60.jpg
/media/uploads/IMAG0126_.200x200.jpg


Do you have PIL properly installed?

Kai

--
IQ++
Tel: +49 361 / 6636700
Fax: +49 361 / 6636702
Mail: kai.die...@iqpp.de
Web: http://www.iqpp.de
Skype: kai.diefenbach

Torvald Bringsvor

unread,
Jan 18, 2011, 9:26:33 AM1/18/11
to djang...@googlegroups.com
Is this sufficient?
Is there something else I need to test?


Python 2.5.2 (r252:60911, Jan  4 2009, 17:40:26)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> try:
...     from PIL import Image, _imaging
... except ImportError:
...     try:
...         import Image, _imaging
...     except ImportError:
...         Image = None
...
>>> print Image
<module 'PIL.Image' from '/home/tbri/virtualenv/lib/python2.5/site-packages/PIL/Image.pyc'>


 
Torvald Baade Bringsvor, Skogvegen 13B, N-1406 Ski



Fra: Kai Diefenbach <kai.die...@iqpp.de>
Til: djang...@googlegroups.com
Sendt: tir, januar 18, 2011 6:31:24 AM
Emne: Re: Problem with gallery

Kai Diefenbach

unread,
Jan 18, 2011, 10:05:24 AM1/18/11
to djang...@googlegroups.com
Am 18.01.2011 um 15:26 schrieb Torvald Bringsvor:

Is this sufficient?
Is there something else I need to test?

Are the decoders properly installed? jpeg, etc.

Torvald Bringsvor

unread,
Jan 19, 2011, 2:50:03 AM1/19/11
to djang...@googlegroups.com
I think the decoder works:



/home/tbri/virtualenv/bin/python -i ./eggs/django_lfc-1.0.2-py2.5.egg/lfc/utils/images.py
i = Image.open('lfc_project/media/uploads/1291492076056.jpg')                                                              
i = Image.open('lfc_project/media/uploads/1291492076056.jpg')
>>> i
<PIL.JpegImagePlugin.JpegImageFile instance at 0xf720a72c>

>>> scale_to_max_size(i, 200, 200)
<PIL.Image.Image instance at 0xf736ba8c>

Any other ideas?


 
Torvald Baade Bringsvor, Skogvegen 13B, N-1406 Ski

Sendt: tir, januar 18, 2011 4:05:24 PM
Emne: Re: Vedr. Problem with gallery
Reply all
Reply to author
Forward
0 new messages