Answer the question
In order to leave comments, you need to log in
Is it necessary to do finish() in Tornado after render() or redirect()?
There is the following code:
@gen.coroutine
def get(self):
if ...:
if self.request.headers.get("Accept-Language").startswith("ru"):
self.render(...)
else:
self.render(...)
else:
self.write(...)
self.finish()
after self.render() или self.redirect()
? I heard that if there is a render or redirect, then it is not necessary, but if there is a gen.coroutine, then you must always write finish.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question