[google-appengine] Re: Saving Objects in GAE with Python

2015-02-15 Thread timh
Do you mean a custom property ?  As all datastore entities are in fact 
custom objects.

T

On Thursday, February 12, 2015 at 7:40:01 PM UTC+8, Saturnino Mateus wrote:

 Hello!
 Is there any way to save custom objects in datastore instead save basic 
 data types?

 Regards!


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9d058286-3b89-45be-bde9-dd811b22d86c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Saving Objects in GAE with Python

2015-02-12 Thread Saturnino Mateus
Im not sure, but thinked this:

class Products(ndb.Model):
item = ndb.PickleProperty()

class Item(object):
def __init__(self,name,price,description):
self.name = name
self.price = price
self.description = description

class SomeHandler(webapp2.RequestHandler):
def get(self):
item1 = Item('Coca',5,'some text')
product = Products(item=item1)
product.put()


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f07a6be0-00f7-4965-aed0-74ebd7bf2d9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.