Ejemplo n.º 1
0
 def edit(self, id=None, **kw):
     return dict(
         form=self.external_report_form,
         action=url('save'),
         options={},
         title='Edit External Report',
         value=id and ExternalReport.by_id(id) or kw,
     )
Ejemplo n.º 2
0
 def edit(self, id=None, **kw):
     return dict(
         form=self.external_report_form,
         action=url("save"),
         options={},
         title="Edit External Report",
         value=id and ExternalReport.by_id(id) or kw,
     )
Ejemplo n.º 3
0
 def save(self, **kw):
     if kw.get('id'):
         report = ExternalReport.by_id(kw['id'])
     else:
         report = ExternalReport()
     report.name = kw.get('name')
     report.url = kw.get('url')
     report.description = kw.get('description')
     session.add(report)
     flash(_(u"%s saved" % report.name))
     redirect(".")
Ejemplo n.º 4
0
 def save(self, **kw):
     if kw.get("id"):
         report = ExternalReport.by_id(kw["id"])
     else:
         report = ExternalReport()
     report.name = kw.get("name")
     report.url = kw.get("url")
     report.description = kw.get("description")
     session.add(report)
     flash(_(u"%s saved" % report.name))
     redirect(".")
Ejemplo n.º 5
0
 def save(self, **kw):
     if kw.get('id'):
         report = ExternalReport.by_id(kw['id'])
     else:
         report = ExternalReport()
     report.name = kw.get('name')
     report.url = kw.get('url')
     report.description = kw.get('description')
     session.add(report)
     flash(_(u"%s saved" % report.name))
     redirect(".")
Ejemplo n.º 6
0
 def delete(self, id):
     report = ExternalReport.by_id(id)
     report_name = report.name
     session.delete(report)
     flash(_(u'Deleted report %s' % report_name))
     redirect('.')
Ejemplo n.º 7
0
 def delete(self, id):
     report = ExternalReport.by_id(id)
     report_name = report.name
     session.delete(report)
     flash(_(u"Deleted report %s" % report_name))
     redirect(".")