How to pass a dtml-var to a python script.
amckay at merlinsoftech.com
Wed Mar 20 21:55:07 CET 2002
If you are placing the things in REQUEST, you dont need to pass them, you can
just extract them from the REQUEST.
ssn = context.REQUEST.SESSION
Sticking the parameters in REQUEST and passing them through is not always the
best way, a more explicit approach is usually better.
On March 20, 2002 11:57 am, Mike wrote:
> I am New to python and Zope and am confused about how to pass a value
> I hold inside of a <dtml-var ... > to a python script: here's what I
> am doing(or doing wrong):
> <dtml-var "ContextSession(REQUEST)">
> <dtml-let choices="REQUEST.SESSION['choices']">
> <dtml-let myTissue="choices['tissue']">
> <dtml-let myHistology="choices['histology']">
> <dtml-let mySubtype="choices['subtype']">
> <dtml-var "CMAPContext(CORE_HOST, 'Context.jsp', myTissue,
> myHistology, mySubtype)">
> ContextSession is a python script that extracts parameters from the
> URL and puts
> them inside of the REQUEST.SESSION.choices placeholder. I then want to
> take them
> out of the session and pass them to the CMAPContext() python script,
> but the way I am doing it doesn't work and I can't find any
> documentation on how to do this.
More information about the Python-list