title: Update to datastore not saved or reading from wrong ansestor?
body: <p>Trying to change the example here: <a href="https://developers.google.com/appengine/docs/python/gettingstartedpython27/usingdatastore" rel="nofollow">https://developers.google.com/appengine/docs/python/gettingstartedpython27/usingdatastore</a></p>
  
  <p>But instead of a Greeting item I would like to save a Student item. Using AngularJS in static directories that interact with <code>/app</code> to get the data. I only have a POST and a GET where POST will save an entry and GET will display first 10 entries.</p>
  
  <p>When I POST json it seems to be saved, the response is:</p>
  
  <pre><code>{"name": "name", "age": 22, "creator": "test@example.com"}
  </code></pre>
  
  <p>When I do the GET request to get the list however nothing is returned, I get: <code>[]</code></p>
  
  <p>Looking at my code and the sample code and going back and forth I can't find the difference. The sample code works and saves Greetings so something must be wrong with my code.</p>
  
  <pre><code>import logging
  import cgi
  import urllib
  import json
  from google.appengine.api import users
  from google.appengine.ext import ndb
  import webapp2
  
  DEFAULT_DS_NAME = 'default_ds'
  
  def student_key(ds_name=DEFAULT_DS_NAME):
      return ndb.Key('Student', ds_name)
  
  class StudentModel(ndb.Model):
      creator = ndb.UserProperty()
      name = ndb.StringProperty(indexed=False)
      age = ndb.IntegerProperty()
  
  class Student(webapp2.RequestHandler):
  
      def post(self):
          st = json.loads(self.request.body)
          student = StudentModel(parent=student_key())
          if users.get_current_user():
              student.creator = users.get_current_user()
          student.name = st['name']
          student.age = st['age']
          key = student.put()
          logging.info(key.id())#logs a number
          st['creator']=student.creator.email()
          self.response.write(json.dumps(st));
  
      def get(self):
          student_query = StudentModel.query(
              ancestor=student_key()).order(-StudentModel.name)
          students = student_query.fetch(10)
          ret=[]
          for student in students:
              s={'name':'','age':0,'creator':''};
              if student.creator:
                  s["creator"]=student.creator.email()
              s["name"]=student.name
              s["age"]=student.age
              logging.info("Pushing s");#never logs anything
              ret.push(s)
          self.response.write(json.dumps(ret))#returns []
  
  application = webapp2.WSGIApplication([
      ('/app/student', Student)
  ], debug=True)
  </code></pre>