Exemplo n.º 1
0
Arquivo: main.py Projeto: rnowak6/CSSI
 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>")
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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))
Exemplo n.º 4
0
 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))
Exemplo n.º 5
0
 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))
Exemplo n.º 6
0
 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))