Beispiel #1
0
    def new_proposals(self):
        for proposal in c.proposals:
            event = Event(type_id=1, proposal=proposal, publish=True, exclusive=False)
            meta.Session.add(event)
        meta.Session.commit()

        h.flash("Events successfully created from Proposals")
        redirect_to(action='index', id=None)
Beispiel #2
0
    def _new(self):
        results = self.form_result['event']

        c.event = Event(**results)
        meta.Session.add(c.event)
        meta.Session.commit()

        h.flash("Event created")
        redirect_to(action='index', id=None)