Step 7: Form Get Methods

There are methods in the Form handling classes, responding to HTTP GET requests, that provide the form itself to the user. The methods do this by turning on a switch in the rendering of the template.

CreateList and CreateItem's GET handlers will pass a Python dictionary structure, with switches and a key, to my render :

class CreateList (webapp.RequestHandler):

def get (self):

template_values = { 'ListForm': 1 }

self.response.out.write (render(template_values))

class CreateItem (webapp.RequestHandler):

def get (self, list_key):

template_values = { 'item_form': 1, 'list_key': list_key }

self.response.out.write (render(template_values))