jeudi 9 avril 2015

Store images in datastore of GAE python while deploying web2py app

I am trying to deploy a web2py application on GAE. When run locally, a phone_details table is defined in db.py using this line



db.define_table('phone_details',Field('image',type='upload'),Field('name',unique=True),Field('screensiz'),Field('primcam'),Field('processor'),Field('ram'),Field('rom'),Field('os'),Field('company'),Field('price','integer'))


To make it run on GAE, I created an entity in cloud datastore naming it 'phone_details' but there only string,boolean,number etc. are allowed datatypes i.e image is not allowed. How to upload image in a column of that table then. Do I need to use blobstore (searched from google, but I don't know how to use it and connect to my table defined in datastore) ?


Aucun commentaire:

Enregistrer un commentaire