Beispiel #1
0
 def _process(self):
     session_key = "reglist_config_{}".format(self.regform.id)
     configuration = {"regform_id": self.regform.id, "data": session.get(session_key)}
     url = url_for(".manage_reglist", self.regform, _external=True)
     if configuration["data"]:
         link = ReportLink.create(self.event_new, REPORT_LINK_TYPE, configuration)
         url = url_for(".manage_reglist", self.regform, config=link.uuid, _external=True)
     return jsonify(url=url)
Beispiel #2
0
 def generate_static_url(self):
     """Return a URL with a uuid referring to the report's configuration."""
     session_key = self._get_config_session_key()
     configuration = {
         'entry_parent_id': self.entry_parent.id,
         'data': session.get(session_key)
     }
     if configuration['data']:
         link = ReportLink.create(self.report_event, self.report_link_type, configuration)
         return self.get_report_url(uuid=link.uuid, external=True)
     else:
         return self.get_report_url(external=True)
Beispiel #3
0
 def generate_static_url(self):
     """Return a URL with a uuid referring to the report's configuration."""
     session_key = self._get_config_session_key()
     configuration = {
         'entry_parent_id': self.entry_parent.id,
         'data': session.get(session_key)
     }
     if configuration['data']:
         link = ReportLink.create(self.report_event, self.report_link_type,
                                  configuration)
         return self.get_report_url(uuid=link.uuid, external=True)
     else:
         return self.get_report_url(external=True)
Beispiel #4
0
 def _process(self):
     session_key = 'reglist_config_{}'.format(self.regform.id)
     configuration = {
         'regform_id': self.regform.id,
         'data': session.get(session_key)
     }
     url = url_for('.manage_reglist', self.regform, _external=True)
     if configuration['data']:
         link = ReportLink.create(self.event_new, REPORT_LINK_TYPE,
                                  configuration)
         url = url_for('.manage_reglist',
                       self.regform,
                       config=link.uuid,
                       _external=True)
     return jsonify(url=url)