Google App Engine Python Datastore

Posted by python appengine on Stack Overflow See other posts from Stack Overflow or by python appengine
Published on 2011-01-07T02:42:15Z Indexed on 2011/01/07 3:53 UTC
Read the original article Hit count: 144

Filed under:
|

Basically what Im trying to make is a data structure where it has the users name, id, and datejoined. Then i want a "sub-structure" where it has the users "text" and the date it was modified. and the user will have multiple instances of this text.

class User(db.Model):
    ID = db.IntegerProperty()         
    name = db.StringProperty()
    datejoined = db.DateTimeProperty(auto_now_add=True)

class Content(db.Model): 
    text = db.StringProperty()
    datemod= db.DateTimeProperty(auto_now_add = True)   

Is the code set up correctly?

© Stack Overflow or respective owner

Related posts about python

Related posts about google-app-engine