I'm using self.render
to render a html template, which is dependent on the information received from the client via ajax in the def post()
method like this:
class aHandler(BaseHandler):
@tornado.web.authenticated
def post(self):
taskComp = json.loads(self.request.body)
if taskComp['type'] == 'edit':
if taskComp['taskType'] == 'task':
self.render(
"tasks.html",
user=self.current_user,
timestamp='',
projects='',
type='',
taskCount='',
resName='')
However this does not redirect the user to the html page 'tasks.html'.
However I see in my console a status:
[I 141215 16:00:55 web:1811] 200 GET /tasks (127.0.0.1)
Where '/tasks' is an alias for tasks.html
Why wouldn't this be redirected?
Or how can data received from ajax, then be used to redirect to the tasks.html page along with all the parameters supplied in the above self.render
request?