Example #1
0
    def render_form(cls, event, **kwargs):
        """Render the request form.

        :param event: the event the request is for
        :param kwargs: arguments passed to the template
        """
        tpl = get_overridable_template_name('event_request_details.html', cls.plugin, 'events/requests/')
        return WPRequestsEventManagement.render_template(tpl, event, **kwargs)
Example #2
0
    def render_form(cls, event, **kwargs):
        """Renders the request form

        :param event: the event the request is for
        :param kwargs: arguments passed to the template
        """
        tpl = get_overridable_template_name('event_request_details.html', cls.plugin, 'events/requests/')
        return WPRequestsEventManagement.render_template(tpl, event, **kwargs)
Example #3
0
 def _process(self):
     definitions = get_request_definitions()
     if not definitions:
         raise NotFound
     requests = Request.find_latest_for_event(self.event)
     if self.protection_overridden:
         definitions = {name: def_ for name, def_ in definitions.iteritems() if def_.can_be_managed(session.user)}
         requests = {name: req for name, req in requests.iteritems()
                     if req.definition and req.definition.can_be_managed(session.user)}
     return WPRequestsEventManagement.render_template('events/requests/event_requests.html', self.event,
                                                      definitions=definitions, requests=requests)
Example #4
0
 def _process(self):
     definitions = get_request_definitions()
     if not definitions:
         raise NotFound
     requests = Request.find_latest_for_event(self.event)
     if self.protection_overridden:
         definitions = {name: def_ for name, def_ in definitions.iteritems() if def_.can_be_managed(session.user)}
         requests = {name: req for name, req in requests.iteritems()
                     if req.definition and req.definition.can_be_managed(session.user)}
     return WPRequestsEventManagement.render_template('events/requests/event_requests.html', self.event,
                                                      definitions=definitions, requests=requests)