def get(self): query = Snack.query() self.response.write("<ul>") for item in query.fetch(): self.response.write("<li>") self.response.write(item.kind + "</li>" + "<br>") self.response.write("</ul>")
def get(self): template = jinja_environment.get_template("templates/hello-world.html") getList = self.request.get("getList") render_data = {} query = Snack.query() render_data["getList"] = query.fetch() self.response.write(template.render(render_data)) for results in query: kind = "<br/>" + results.kind
def get(self): my_template = jinja_environment.get_template('templates/snackPage2.html') query = Snack.query() query1 = query.fetch() # self.response.write(query.fetch()[0].name) # for item in query1: # self.response.write(item.name + "</br>") my_vars = {'query1': query1} self.response.write(my_template.render(my_vars))
def get(self): template = jinja_environment.get_template("templates/snacklist.html") query = Snack.query() list_of_results = query.fetch() data = [] render_data = {} for result in list_of_results: list_of_results_kind = result.kind data.append(list_of_results_kind) render_data["kind"] = data self.response.write(template.render(render_data))
def get(self): my_template = jinja_environment.get_template('templates/dispsnack.html') query = Snack.query() render_data={} render_data['list_of_snacks']=query.fetch() self.response.write(my_template.render(render_data))
def get(self): new_template = jinja_environment.get_template('templates/display.html') query = Snack.query() render_data = {} render_data['snack_list'] = query.fetch() self.response.write(new_template.render(render_data))