Ejemplo n.º 1
0
    def get(self, shake_id=None):
        shake = Shake.get('id=%s and type=%s', shake_id, 'group')
        shake_categories = ShakeCategory.all()
        featured_shakes = Shake.where('featured = 1')
        if not shake:
            return self.redirect("/admin/group-shakes")

        return self.render("admin/group-shake-view.html",
                           shake=shake,
                           shake_categories=shake_categories,
                           featured_shakes=featured_shakes)
Ejemplo n.º 2
0
 def get(self):
     group_shakes = Shake.where('type=%s ORDER BY created_at desc', 'group')
     return self.render("admin/group-shake-list.html",
                        group_shakes=group_shakes)
Ejemplo n.º 3
0
 def get(self, type=None):
     group_shakes = Shake.where('type=%s ORDER BY recommended', 'group')
     return self.render("admin/group-shake-recommended.html",
                        group_shakes=group_shakes)