Hello,
I want to keep user information and files with blobstore but I could
not do it.
I have a structure like:
class Expert(db.Model):
N = db.StringProperty(indexed=True, required=True,
verbose_name='Name')
S = db.StringProperty(indexed=True, required=True,
verbose_name='Surname')
BD = db.DateProperty(indexed=True, required=True, verbose_name='Birth
Date')
EY = db.IntegerProperty(indexed=True, verbose_name='Years of
Experience')
class AddExpert(webapp.RequestHandler):
upload_url = blobstore.create_upload_url('/upload')
doRender(self, "addexpert.htm", {'upload_url': upload_url } )
and html form like:
<form id="upload_form" action="{{ upload_url }}" enctype="multipart/
form-data" method="post">
<table>
<tr><td class="leftcolumn">Name</td><td><input type="text"
name="name" /></td></tr>
<tr><td class="leftcolumn">Surname</td><td><input type="text"
name="surname" /></td></tr>
....
when I tried to upload my data and redirect my page:
class Upload(blobstore_handlers.BlobstoreUploadHandler):
def post(self):
upload_files = self.get_uploads('file')
blob_info = upload_files[0]
blob = blob_info.key()
N = self.request.get('name')
S = self.request.get('surname')
......
self.redirect('/')
It redirects to an empty page. It saves the file at __BlobInfo__ (I
could see it at SDK console) but it does not save other information.
Am I missing any point?
Thanks for helps in advance.
--
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.