[Zope] REQUEST

Thomas B. Passin tpassin@mitretek.org
Wed, 22 May 2002 16:23:05 -0400


[D. Rick Anderson]

>
> Anwho .. the lines listed below work great if you put ANYTHING in there
> other than REQUEST. They even work if you put single quotes around
> REQUEST. It just creates the dtml document with the date as the name and
> sticks the work 'REQUEST' in it. How can I actually get the current
> REQUEST information into something? Our first atempt was to insert it
> into a table on the Oracle server, but that failed with similar results.
>

I'd try backquotes around REQUEST:

`REQUEST`

That should return a string representation of the request.  Otherwise you
can walk through the REQUEST and output all its properties to a string, then
store the string.  You probably would want to make a separate method to do
the formatting of the REQUEST.

It's a perfect job for prettyprint, but I don't recall that you can get at
that from dtml.   You could from an external method, though:

def formatRequest(request):
    from prettyprint import prettyprint
    return prettyprint(request)

Cheers,

Tom P