def show(self, id=0): user = User.get(cherrypy.request.db, int(id)) if not hasattr(user, 'id'): return drinks = Drink.list(cherrypy.request.db) template = self.templateEnv.get_template('users/show.html') return template.render(user=user, drinks=drinks)
def show(self, id = 0): user = User.get(cherrypy.request.db, int(id)) if not hasattr(user, 'id'): return drinks = Drink.list(cherrypy.request.db) template = self.templateEnv.get_template('users/show.html') return template.render(user=user, drinks=drinks)
def index(self): drinks = Drink.list(cherrypy.request.db) template = self.templateEnv.get_template('drinks/index.html') return template.render(drinks=drinks)