Commits

daehee han committed 46e47c7

Success: adding entity

Comments (0)

Files changed (1)

 
 class MainPage(webapp.RequestHandler):
   def get(self):
-    myquery = EntityDict.all().order('-date')
+    myquery = EntityDict.query().order(-EntityDict.date)
     entities = myquery.fetch(10)
 
     if users.get_current_user():
       self.response.out.write('<html>NOT OK</html>')
       return
 		
-    entity.eid = self.request.get('eid')
+    entity.eid = int(self.request.get('eid'))
     entity.word = self.request.get('word')
     entity.ehtype = self.request.get('ehtype')
-    entity.parent = self.request.get('parent')
+    entity.parent = int(self.request.get('parent'))
     entity.put()
     self.response.out.write('<html>OK</html>')
     #self.redirect('/')