Running the same code for get(self) as post(self)
- by Peter Farmer
Its been mentioned in other answers about getting the same code running for both the def get(self) and the def post(self) for any given request. I was wondering what techniques people use, I was thinking of:
class ListSubs(webapp.RequestHandler):
def get(self):
self._run()
def post(self):
self._run()
def _run(self):
self.response.out.write("This works nicely!")