[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Advanced Zope Scripting

nobody@nowhere.com nobody@nowhere.com
Wed, 04 Sep 2002 11:30:39 -0400


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/ScriptingZope.stx#3-29

---------------

      All scripts can be passed parameters. A parameter gives a script
      more information about what to do. When you call a script from the
      web, Zope will try to find the script's parameters in the web
      request and pass them to your script. For example if you have a
      script with parameters *dolphin* and *REQUEST* Zope will
      look for *dolphin* in the web request, and will pass the request
      itself as the *REQUEST* parameter. In practical terms this means
      that it is easy to do form processing in your script. For example
      here is a form::

        <form action="actionScript">
        Name <input type="text" name="name"><br>
        Age <input type="text" name="age:int"><br>
        <input type="submit">
        </form>

        % Anonymous User - Aug. 23, 2002 5:38 am:
         Can you also pass DTML variables to a Python Script from within a sequence loop in a DTML Document. For
         Example:
         <dtml-in sql_query>
          <dtml-call expr="PythonScript(variable='<dtml-var sequence_value>')">
         </dtml-in>

         I know this does not work, but is there another syntax to get it to work. Or is the PythonScript always
         rendered first, before the DTML is interpreted.

        % Anonymous User - Sep. 4, 2002 11:30 am:
         <dtml-in sql_query>
           <dtml-call expr="PythonScript(sequence_value)">
          </dtml-in>

        % Anonymous User - Sep. 4, 2002 11:30 am:
         <dtml-in sql_query>
           <dtml-call expr="PythonScript(sequence_value)">
          </dtml-in>