Exemplo n.º 1
0
Arquivo: pages.py Projeto: niczy/hyo
 def get(self, restaurant_uid):
   "TODO: get restaurant uid from the path."
   logging.info(restaurant_uid)
   categories = category_logic.get_all_by_restaurant_uid(restaurant_uid)
   dishes = dish_logic.get_all_by_restaurant_uid(restaurant_uid)
   self.render('restaurant.html',
       {"categories": json_encoder.encode(categories),
         "dishes": json_encoder.encode(dishes),
         "restaurant_uid": restaurant_uid})
Exemplo n.º 2
0
Arquivo: api.py Projeto: niczy/hyo
 def get(self):
   restaurant_uid = self.request.get(RESTAURANT_UID)
   categories = category_logic.get_all_by_restaurant_uid(restaurant_uid)
   self.send_response(categories)