There are actually a couple of questions here. For what I'm doing, I'm doing a basic image upload with Django 1.1 and Google App Engine. Here is my form class:
class UploadPictureForm(forms.Form):
picture = forms.ImageField()
And then on submit, I have the following code:
def handle_picture(request):
form = UploadPictureForm(request.POST, request.FILES)
if form.is_valid():
save_picture(request.FILES['picture']
I get the following error:
Exception Type: ImportError
Exception Value: No module named PIL
Exception Location: /Library/Python/2.6/site-packages/django/forms/fields.py in clean, line 495
Python Executable: /usr/bin/python2.6
Python Version: 2.6.1
Python Path: [..., '/Library/Python/2.6/site-packages', '/Library/Python/2.6/site-packages/PIL']
and I've installed PIL in the site-packages
directory and if I run python from the command line, I can import PIL with import PIL
SO question #1 is why doesn't this work? Is GAE doing something that's keeping this from working? The second thing is that I notice GAE has some Image APIs. Should I be using those instead? All of this is somewhat new for me.