[mod_python] more psp and publisher questions

David Bear David.Bear at asu.edu
Thu May 18 21:19:43 EDT 2006


I'm using the publisher handler and psp example framework. I would
much rather have something like tal in zope -- but psp will work for
now.

The general model is to have a dispatcher script call psp pages. As I
was deconstructing an existing html form I realized that I would like
to create multipe psp files -- and then include them in other psp
files.

For example, I create a form that only has form html in it, and form
fields are populated by psp statements.

Then I have a main page that wants to include the form psp file.

How does the form psp file access the same name space as the main psp
file?

for example, in main I instantiate some 'global variables'


<% myform = "<form>bla blah bal </form>"
   myftemplate = "formtemplate.psp"
   formsubmit = "http://myserver/modpython.py/submit" %>
<html>
more blah...
  <%= myform %>
  <%= myftemplate %>
</html>

then formtemplate.psp has
<form name="test" method="post" action="<%= formsubmit %>">
blahh..


How would the formtemplate.psp file 'know' about the name 'formsubmit'
declared in the first template?

and as I write this, I'm not sure I even understand how one psp file
would call another...

I need some more examples on using psp's and calling them from
publisher scripts -- and from each other.  I been going through the
modpython.org docs and its not enough for to understand this yet.

-- 
David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"


More information about the Mod_python mailing list