コード例 #1
0
    def edit(self, id):
        c.proposal_status = ProposalStatus.find_by_id(id)

        defaults = h.object_to_defaults(c.proposal_status, 'proposal_status')

        form = render('/proposal_status/edit.mako')
        return htmlfill.render(form, defaults)
コード例 #2
0
    def _delete(self, id):
        c.proposal_status = ProposalStatus.find_by_id(id)
        meta.Session.delete(c.proposal_status)
        meta.Session.commit()

        h.flash("Proposal Status has been deleted.")
        redirect_to('index')
コード例 #3
0
ファイル: proposal_status.py プロジェクト: tmfox/zookeepr
    def edit(self, id):
        c.proposal_status = ProposalStatus.find_by_id(id)

        defaults = h.object_to_defaults(c.proposal_status, 'proposal_status')

        form = render('/proposal_status/edit.mako')
        return htmlfill.render(form, defaults)
コード例 #4
0
ファイル: proposal_status.py プロジェクト: tmfox/zookeepr
    def _delete(self, id):
        c.proposal_status = ProposalStatus.find_by_id(id)
        meta.Session.delete(c.proposal_status)
        meta.Session.commit()

        h.flash("Proposal Status has been deleted.")
        redirect_to('index')
コード例 #5
0
    def delete(self, id):
        """Delete the proposal_status

        GET will return a form asking for approval.

        POST requests will delete the item.
        """
        c.proposal_status = ProposalStatus.find_by_id(id)
        return render('/proposal_status/confirm_delete.mako')
コード例 #6
0
ファイル: proposal_status.py プロジェクト: tmfox/zookeepr
    def delete(self, id):
        """Delete the proposal_status

        GET will return a form asking for approval.

        POST requests will delete the item.
        """
        c.proposal_status = ProposalStatus.find_by_id(id)
        return render('/proposal_status/confirm_delete.mako')
コード例 #7
0
ファイル: proposal_status.py プロジェクト: tmfox/zookeepr
    def _new(self):
        results = self.form_result['proposal_status']

        c.proposal_status = ProposalStatus(**results)
        meta.Session.add(c.proposal_status)
        meta.Session.commit()

        h.flash("Proposal Status created")
        redirect_to(action='index', id=None)
コード例 #8
0
    def _edit(self, id):
        proposal_status = ProposalStatus.find_by_id(id)

        for key in self.form_result['proposal_status']:
            setattr(proposal_status, key, self.form_result['proposal_status'][key])

        # update the objects with the validated form data
        meta.Session.commit()
        h.flash("The Proposal Status has been updated successfully.")
        redirect_to(action='index', id=None)
コード例 #9
0
ファイル: proposal_status.py プロジェクト: tmfox/zookeepr
    def _edit(self, id):
        proposal_status = ProposalStatus.find_by_id(id)

        for key in self.form_result['proposal_status']:
            setattr(proposal_status, key, self.form_result['proposal_status'][key])

        # update the objects with the validated form data
        meta.Session.commit()
        h.flash("The Proposal Status has been updated successfully.")
        redirect_to(action='index', id=None)
コード例 #10
0
 def index(self):
     c.proposal_status_collection = ProposalStatus.find_all()
     return render('/proposal_status/list.mako')
コード例 #11
0
 def view(self, id):
     c.proposal_status = ProposalStatus.find_by_id(id)
     return render('/proposal_status/view.mako')
コード例 #12
0
ファイル: proposal_status.py プロジェクト: tmfox/zookeepr
 def index(self):
     c.proposal_status_collection = ProposalStatus.find_all()
     return render('/proposal_status/list.mako')
コード例 #13
0
ファイル: proposal_status.py プロジェクト: tmfox/zookeepr
 def view(self, id):
     c.proposal_status = ProposalStatus.find_by_id(id)
     return render('/proposal_status/view.mako')