def post(self): person = PersonModel() person.first = cgi.escape(self.request.get('first')) person.last = cgi.escape(self.request.get('last')) person.email = cgi.escape(self.request.get('email')) person.encrypt() person.put() self.renderTemplate()
def renderTemplate(self): query = PersonModel.all() people = query.fetch(100) for person in people: person.decrypt() template_values = {'people' : people} template = jinja_environment.get_template('home.html') self.response.out.write(template.render(template_values))