i am trying to do something like
try:
q = db.GqlQuery("SELECT * FROM people WHERE location = :loc", loc = location).fetch(1)
self.render('experimentform.html', q = q)
except:
render('experimentform.html')
location = self.request.get('location')
to allow users to query the datastore using a drop down menu.
it works up to rendering experimentform, but after location has been submitted i get a 405 error, method post is not allowed.
thanks for any help.
you are submitting your form as a POST but you don’t (by the sound of it) have a POST hander configured.
so where you have
you need this as well:
Or you could reconfigure your form to use GET instead of POST and leave your current code alone: