def _delete(self, id): c.event = Event.find_by_id(id) meta.Session.delete(c.event) meta.Session.commit() h.flash("Event has been deleted.") redirect_to('index')
def _delete(self, id): c.event = Event.find_by_id(id) meta.Session.delete(c.event) meta.Session.commit() h.flash("Event has been deleted.") redirect_to('index')
def delete(self, id): """Delete the event GET will return a form asking for approval. POST requests will delete the item. """ c.event = Event.find_by_id(id) return render('/event/confirm_delete.mako')
def delete(self, id): """Delete the event GET will return a form asking for approval. POST requests will delete the item. """ c.event = Event.find_by_id(id) return render('/event/confirm_delete.mako')
def _edit(self, id): event = Event.find_by_id(id) for key in self.form_result['event']: setattr(event, key, self.form_result['event'][key]) # update the objects with the validated form data meta.Session.commit() h.flash("The Event has been updated successfully.") redirect_to(action='index', id=None)
def _edit(self, id): event = Event.find_by_id(id) for key in self.form_result['event']: setattr(event, key, self.form_result['event'][key]) # update the objects with the validated form data meta.Session.commit() h.flash("The Event has been updated successfully.") redirect_to(action='index', id=None)
def edit(self, id): c.event = Event.find_by_id(id) if c.event.proposal: c.proposals.append(c.event.proposal) defaults = h.object_to_defaults(c.event, 'event') defaults['event.type'] = c.event.type_id defaults['event.proposal'] = c.event.proposal_id form = render('/event/edit.mako') return htmlfill.render(form, defaults)
def edit(self, id): c.event = Event.find_by_id(id) if c.event.proposal: c.proposals.append(c.event.proposal) defaults = h.object_to_defaults(c.event, 'event') defaults['event.type'] = c.event.type_id defaults['event.proposal'] = c.event.proposal_id form = render('/event/edit.mako') return htmlfill.render(form, defaults)
def edit(self, id): c.event = Event.find_by_id(id) if c.event.proposal: c.proposals.append(c.event.proposal) defaults = h.object_to_defaults(c.event, "event") defaults["event.type"] = c.event.type_id defaults["event.proposal"] = c.event.proposal_id form = render("/event/edit.mako") return htmlfill.render(form, defaults)
def view(self, id): c.event = Event.find_by_id(id) return render('/event/view.mako')
def view(self, id): c.event = Event.find_by_id(id) return render('/event/view.mako')