Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-38

Passing req.form into psp.PSP().

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.4
    • 3.3.1
    • core
    • None

    Description

      When calling psp.PSP() explicitly to render PSP pages, it will internally setup
      req.form if it determines that the form is accessed by the PSP page.

      Problem is that if you are wanting to trigger psp.PSP() from a publisher function
      any form parameters have already been processed and req.form created. For a
      POST request this is problematic as in doing this it will have consumed all the
      content of the request.

      This means that when the form is processed a second time by psp.PSP(), it will
      find no request content. Thus, the PSP page will only be able to make use of
      GET form parameters and not POST form parameters.

      It would be an improvement if psp.PSP() allowed a instance of util.FieldStorage
      which has previously been created to be passed in through the "form" parameter
      of the constructor. Ie.,

      template = psp.PSP(req,filename=path,vars=settings,form=req.form)
      template.run()

      Attachments

        Activity

          People

            grahamd Graham Phillip Dumpleton
            grahamd Graham Phillip Dumpleton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: