def edit(self, id): """edit item with id """ item = self.item_q.filter_by(id=id).first() if item: c.headline = item.headline c.desc = item.desc c.url = item.url c.status = item.status return render('/edit.mako')
def show(self, id): """Displays Item """ item = self.item_q.filter_by(id=id).first() if item: c.headline = item.headline c.desc = item.desc c.url = item.uri c.status = item.status return render('/items/show.mako') abort(404)
def unread(self): """Displays unread items """ #get list of all unread items c.items = self.item_q.all() return render('/items/unread.mako')
def add(self): return render('/items/new.mako')