Hi, Can anyone tell me what are the predefined error types for the <dtml-raise type=...> tag, and how to use them? The DTML manual talks about "Unauthorized", and "Redirect", but doesn't give any details. I haven't found how to use "Redirect" so far. Thanks, Stefan.
Dunno about raise, but if you want to do a redirect, try (untested,YMMV,etc) <dtml-call "RESPONSE.redirect(url)"> cheers, Chris Stefan Langerman wrote:
Hi,
Can anyone tell me what are the predefined error types for the <dtml-raise type=...> tag, and how to use them? The DTML manual talks about "Unauthorized", and "Redirect", but doesn't give any details. I haven't found how to use "Redirect" so far.
Thanks,
Stefan.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Thanks... but I think I really need to raise an error: I want to invoke the redirect in the standard_html_header, so if I use <dtml-call "RESPONSE.redirect(url)">, only the header will be redirected (I think...). Another, slightly related question: On my zope, whenever there is an error, the whole Traceback is printed on the error page, and this doesn't seem to be part of the standard_error_message. Does anyone know how to hide it, or to put it in a html comment, like www.zope.org does? Thanks, Stefan. On Thu, 2 Mar 2000, Chris Withers wrote:
Dunno about raise, but if you want to do a redirect, try (untested,YMMV,etc)
<dtml-call "RESPONSE.redirect(url)">
cheers,
Chris
Stefan Langerman wrote:
Hi,
Can anyone tell me what are the predefined error types for the <dtml-raise type=...> tag, and how to use them? The DTML manual talks about "Unauthorized", and "Redirect", but doesn't give any details. I haven't found how to use "Redirect" so far.
Thanks,
Stefan.
Stefan Langerman wrote:
Thanks... but I think I really need to raise an error: I want to invoke the redirect in the standard_html_header, so if I use <dtml-call "RESPONSE.redirect(url)">, only the header will be redirected (I think...).
This will redirect the whole page, as it gives a client-side redirect.
Another, slightly related question: On my zope, whenever there is an error, the whole Traceback is printed on the error page, and this doesn't seem to be part of the standard_error_message. Does anyone know how to hide it, or to put it in a html comment, like www.zope.org does?
it only does this if you're logged in, otherwise it puts it in a comment (or displays your standard_error_message) ~mindlace
From: "Stefan Langerman" <lfalse@cs.rutgers.edu>
Thanks... but I think I really need to raise an error: I want to invoke the redirect in the standard_html_header, so if I use <dtml-call "RESPONSE.redirect(url)">, only the header will be redirected (I think...).
No, a Redirect is a client side thing. The response will tell your browser to go elsewhere.
Another, slightly related question: On my zope, whenever there is an error, the whole Traceback is printed on the error page, and this doesn't seem to be part of the standard_error_message. Does anyone know how to hide it, or to put it in a html comment, like www.zope.org does?
You have to start up your Zope install in non-debug mode. By default, it is started with the -D flag (see you start script). Remove that flag, and all your tracebacks will be demoted to HTML comments. Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------
participants (4)
-
Chris Withers -
ethan mindlace fremen -
Martijn Pieters -
Stefan Langerman