views:

260

answers:

1

Hey guys,

I'm deploying a Django site on my Vserver (Debian Lenny) and I'm having problem with PIL.

I'm using virtualenv as well. When I'm in the virtualenv and type pip install -U PIL everything installs fine and I get this:

*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
*** FREETYPE2 support not available
*** LITTLECMS support not available

And when I go in to the shell (python manage.py shell) and type

from PIL import Image

I get no error.

But when I use it in the Django project (uploading an image in the admin for example) I just get

No module named PIL

I don't think it's a problem with the model because it works fine on the development machine but here is part of the class:

class Category(models.Model):
    name = models.CharField(max_length=255, verbose_name="Name")
    logo = models.ImageField(upload_to='images/category/', blank=True, null=True, verbose_name="Logo")

I'm going out of my mind about this. I feel like this is a very common issue but I've been trying to google this all day with no luck.

Thanks in advance, AndriJan

A: 

I figured it out, it was a problem with the .wsgi file, it wasn't looking in the lib folder in the virtualenv :)

AndriJan