from google.appengine.ext import webapp
from google.appengine.ext import db
from google.appengine.ext.webapp.util import run_wsgi_app
class DS(db.Model):
mozi = db.StringProperty()
suuji = db.IntegerProperty()
class main(webapp.RequestHandler):
def get(self):
#保存方法
ds = DS()
ds.IDE = 'last'
ds.suuji = 3
ds.put()
#読み出し方法
grts = db.GqlQuery('SELECT * FROM DS')
for grt in grts:
self.response.out.write(grt.mozi)
self.response.out.write(grt.suuji)
application = webapp.WSGIApplication([('/',main)],debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
0 件のコメント:
コメントを投稿