Ticket #8808: wizard_parse_params_shortcut.patch

File wizard_parse_params_shortcut.patch, 917 bytes (added by Michael P. Jung, 16 years ago)

patch for FormWizard.parse_params to be able to cut a request short

  • wizard.py

     
    5252        if 'extra_context' in kwargs:
    5353            self.extra_context.update(kwargs['extra_context'])
    5454        current_step = self.determine_step(request, *args, **kwargs)
    55         self.parse_params(request, *args, **kwargs)
     55        return_value = self.parse_params(request, *args, **kwargs)
     56        if return_value is not None:
     57            return return_value
    5658
    5759        # Sanity check.
    5860        if current_step >= self.num_steps():
     
    169171        *args and **kwargs were passed to __call__(), sets some state.
    170172
    171173        This is called at the beginning of __call__().
     174
     175        When returning anything but None in this method the request is
     176        cut short and the return value of this method is used.
    172177        """
    173178        pass
    174179
Back to Top