[Zope] view DTML source

Anders Eriksson Anders Eriksson <ame@swipnet.se>
Fri, 24 Nov 2000 18:40:20 +0100


Hello zopistas,

On the zope.org there is a 'method' called view_source, which lets you
see the DTML source of a page. I 'borrowed' this code, by using
view_source on itself and got this:

<!--#var standard_html_header-->
<pre>
<!--#var "document_src(REQUEST,RESPONSE)" html_quote-->
</pre>
<!--#call "RESPONSE.setHeader('content-type','text/html')"-->
<!--#var standard_html_footer-->

I then created a DMTL-document called 'view_source' with this content.
But when I run, using http://swescout.myip.org/index_html/view_source
it I get this traceback:

Traceback (innermost last):
  File D:\SweScout\lib\python\ZPublisher\Publish.py, line 222, in publish_module
  File D:\SweScout\lib\python\ZPublisher\Publish.py, line 187, in publish
  File D:\SweScout\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook
    (Object: index_html)
  File D:\SweScout\lib\python\ZPublisher\Publish.py, line 171, in publish
  File D:\SweScout\lib\python\ZPublisher\mapply.py, line 160, in mapply
    (Object: view_source)
  File D:\SweScout\lib\python\ZPublisher\Publish.py, line 112, in call_object
    (Object: view_source)
  File D:\SweScout\lib\python\OFS\DTMLDocument.py, line 177, in __call__
    (Object: view_source)
  File D:\SweScout\lib\python\DocumentTemplate\DT_String.py, line 528, in __call__
    (Object: view_source)
  File D:\SweScout\lib\python\OFS\DTMLMethod.py, line 168, in __call__
    (Object: standard_html_header)
  File D:\SweScout\lib\python\DocumentTemplate\DT_String.py, line 528, in __call__
    (Object: standard_html_header)
AttributeError: __call__

This is my data:
Zope version: Zope 2.2.2 (binary release, python 1.5.2, win32-x86)
Python version: 1.5.2 (#0, Jul 30 1999, 09:52:18) [MSC 32 bit (Intel)] 
System Platform: win32 


Anyone that know why I get this error and how I fix it?


-- 
Best regards,
 Anders                          mailto:ame@swipnet.se

Science is everything we understand well enough to explain to a computer. 
Art is everything else. - David Knuth