#!/usr/bin/env python # coding: utf-8 # # GOAL - Learn How to pass variables from the back-end to the front-end # Start by [downloading](http://bit.ly/1PmXydo) ***02 - Lesson*** and opening the ***app.py*** file. # class MainHandler(tornado.web.RequestHandler): # def get(self): # self.render('templates/index.html', # page_title = 'This is Amazing!!!', # page_heading = 'Welcome to Tornado' # ) # The only difference between the first lesson and this one is that we now have two new variables. What we are going to do is pass these two variables to the index.HTML page. # # **New Variables:**: # # * page_title # * page_heading # # Notice all we had to do is simply pass the variables inside the ***render*** function. # ## How do we accept variables on the HTML side of our web app? # # Remember that we have created two new variables named ***page_title*** and ***page_heading*** and we are passing these variables to the ***index.HTML*** page. # #### template.HTML # > Open the template.HTML page in lesson 2 #