Exemple #1
0
 def post(self):
     hunt_name = self.request.get('hunt-name')
     hunt = Hunt.all().filter('name =', hunt_name).get()
     if not hunt:
         hunt = Hunt(name=hunt_name, owner=self.user)
         hunt.put()
     self.redirect('/hunt/%s' % hunt.key().id())
Exemple #2
0
 def post(self):
     hunt_name = self.request.get("hunt-name")
     hunt = Hunt.all().filter("name =", hunt_name).filter("owner =", self.user).get()
     if not hunt:
         hunt = Hunt(name=hunt_name, owner=self.user)
         hunt.put()
     self.redirect("/hunt/%s" % hunt.key().id())
Exemple #3
0
 def get(self):
     hunts = list(Hunt.all().filter('owner =', self.user))
     self.response.out.write(utils.render('templates/index.html', {'hunts': hunts}))
Exemple #4
0
 def get(self):
     user = users.get_current_user()
     hunts = []
     if user:
         hunts = list(Hunt.all().filter('owner =', user))
     self.response.out.write(utils.render('templates/index.html', {'hunts': hunts}))
Exemple #5
0
 def get(self):
     hunts = list(Hunt.all().filter("owner =", self.user))
     self.response.out.write(utils.render("templates/index.html", {"hunts": hunts}))