Hi,
I've been playing around with App Engine and have a problem with a
FileUpload - I have implemented a "raw" form, i.e. hand coded -
however I'd rather use the forms in djangoforms - and that's where I
run into trouble.
I've read the post from Mathias (http://appengineguy.com/2008/06/
uploading-files-to-app-engine-via.html) and got Python to not complain
any longer about the FileField by importing it this way:
###
from django import forms
from google.appengine.ext.db import djangoforms
from django.db import models
class WineForm(djangoforms.ModelForm):
...
picture = models.FileField()
class Meta:
....
###
My model uses the following field (picture = db.BlobProperty())
- my form view looks like this:
###
form = MyUploadForm(request.POST, request.FILES) # A form bound to the
POST data
if form.is_valid():
form.save()
###
and finally it's supposed to be rendered with a form tag using
multipart/form-data and {{ form.as_p }} -
but the filefield never shows up in the rendered html...
Any clues?
Thanks,
Flo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---