def _delete(self, id): c.proposal_type = ProposalType.find_by_id(id) meta.Session.delete(c.proposal_type) meta.Session.commit() h.flash("Proposal type has been deleted.") redirect_to("index")
def __before__(self, **kwargs): c.proposal_types = ProposalType.find_all() c.target_audiences = TargetAudience.find_all() c.accommodation_assistance_types = AccommodationAssistanceType.find_all() c.travel_assistance_types = TravelAssistanceType.find_all() c.proposal_event_targets = ProposalEventTarget.find_all() log.debug("event target list: %s", c.proposal_event_targets)
def new(self): # call for miniconfs has closed if c.cfmini_status == 'closed': return render("proposal/closed_mini.mako") elif c.cfmini_status == 'not_open': return render("proposal/not_open_mini.mako") c.proposal_type = ProposalType.find_by_name('Miniconf') c.person = h.signed_in_person() h.check_for_incomplete_profile(c.person) defaults = { 'proposal.type': c.proposal_type.id, 'proposal.technical_requirements': "", 'proposal.accommodation_assistance': 1, 'proposal.travel_assistance': 1, 'proposal.video_release': 0, 'proposal.slides_release': 0, 'person.name': c.person.firstname + " " + c.person.lastname, 'person.mobile': c.person.mobile, 'person.experience': c.person.experience, 'person.bio': c.person.bio, } form = render("proposal/new_mini.mako") return htmlfill.render(form, defaults)
def edit(self, id): c.proposal_type = ProposalType.find_by_id(id) defaults = h.object_to_defaults(c.proposal_type, "proposal_type") form = render("/proposal_type/edit.mako") return htmlfill.render(form, defaults)
def new(self): # call for miniconfs has closed if c.cfmini_status == 'closed': return render("proposal/closed_mini.mako") elif c.cfmini_status == 'not_open': return render("proposal/not_open_mini.mako") c.proposal_type = ProposalType.find_by_name('Miniconf') c.person = h.signed_in_person() h.check_for_incomplete_profile(c.person) defaults = { 'proposal.type': c.proposal_type.id, 'proposal.technical_requirements': "", 'proposal.accommodation_assistance': 1, 'proposal.travel_assistance': 1, 'proposal.video_release': 0, 'proposal.slides_release': 0, 'person.name' : c.person.firstname + " " + c.person.lastname, 'person.mobile' : c.person.mobile, 'person.experience' : c.person.experience, 'person.bio' : c.person.bio, } form = render("proposal/new_mini.mako") return htmlfill.render(form, defaults)
def edit(self, id): c.proposal_type = ProposalType.find_by_id(id) defaults = h.object_to_defaults(c.proposal_type, 'proposal_type') form = render('/proposal_type/edit.mako') return htmlfill.render(form, defaults)
def _delete(self, id): c.proposal_type = ProposalType.find_by_id(id) meta.Session.delete(c.proposal_type) meta.Session.commit() h.flash("Proposal type has been deleted.") redirect_to('index')
def index(self): c.proposal_type_collection = ProposalType.find_all() c.review_collection_by_type = {} for proposal_type in c.proposal_type_collection: query = Review.by_reviewer(h.signed_in_person().id).join(Proposal).filter_by(proposal_type_id=proposal_type.id) c.review_collection_by_type[proposal_type] = query.all() return render('/review/list.mako')
def latex(self): c.proposal_type = ProposalType.find_all() for type in c.proposal_type: print type response.headers['Content-type'] = 'text/plain; charset=utf-8' return render('/proposal/latex.mako')
def latex(self): c.proposal_type = ProposalType.find_all() for type in c.proposal_type: print type response.headers['Content-type']='text/plain; charset=utf-8' return render('/proposal/latex.mako')
def latex(self): c.proposal_type = ProposalType.find_all() for type in c.proposal_type: print type response.headers["Content-type"] = "text/plain; charset=utf-8" return render("/proposal/latex.mako")
def delete(self, id): """Delete the proposal type GET will return a form asking for approval. POST requests will delete the item. """ c.proposal_type = ProposalType.find_by_id(id) return render('/proposal_type/confirm_delete.mako')
def delete(self, id): """Delete the proposal type GET will return a form asking for approval. POST requests will delete the item. """ c.proposal_type = ProposalType.find_by_id(id) return render("/proposal_type/confirm_delete.mako")
def _new(self): results = self.form_result['proposal_type'] c.proposal_type = ProposalType(**results) meta.Session.add(c.proposal_type) meta.Session.commit() h.flash("Proposal type created") redirect_to(action='view', id=c.proposal_type.id)
def _edit(self, id): proposal_type = ProposalType.find_by_id(id) for key in self.form_result["proposal_type"]: setattr(proposal_type, key, self.form_result["proposal_type"][key]) # update the objects with the validated form data meta.Session.commit() h.flash("Proposal type has been updated successfully.") redirect_to(action="view", id=id)
def _edit(self, id): proposal_type = ProposalType.find_by_id(id) for key in self.form_result['proposal_type']: setattr(proposal_type, key, self.form_result['proposal_type'][key]) # update the objects with the validated form data meta.Session.commit() h.flash("Proposal type has been updated successfully.") redirect_to(action='view', id=id)
def index(self): c.proposal_type_collection = ProposalType.find_all() c.review_collection_by_type = {} for proposal_type in c.proposal_type_collection: query = Review.by_reviewer( h.signed_in_person()).join(Proposal).filter_by( proposal_type_id=proposal_type.id) c.review_collection_by_type[proposal_type] = query.all() return render('/review/list.mako')
def __before__(self, **kwargs): c.proposal_types = ProposalType.find_all() c.target_audiences = TargetAudience.find_all() c.accommodation_assistance_types = AccommodationAssistanceType.find_all( ) c.travel_assistance_types = TravelAssistanceType.find_all()
def index(self): c.proposal_type_collection = ProposalType.find_all() return render('/proposal_type/list.mako')
def __before__(self, **kwargs): c.proposal_types = ProposalType.find_all() c.target_audiences = TargetAudience.find_all() c.accommodation_assistance_types = AccommodationAssistanceType.find_all() c.travel_assistance_types = TravelAssistanceType.find_all()
def _to_python(self, value, state): return ProposalType.find_by_id(value)
def view(self, id): c.proposal_type = ProposalType.find_by_id(id) return render('/proposal_type/view.mako')
def index(self): c.proposal_type_collection = ProposalType.find_all() return render("/proposal_type/list.mako")
def view(self, id): c.proposal_type = ProposalType.find_by_id(id) return render("/proposal_type/view.mako")