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
On Fri, 24 Nov 2000, Anders Eriksson wrote:
(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?
It looks like you triggeres a "dtml-callable" bug in Zope. Patch for fixing it was spread few days ago; it will be incorporated into 2.2.4... Oleg. (All opinions are mine and not of my employer) ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
Anders Eriksson (ame@swipnet.se) asked about view_source.... I'm not sure exactly what's going on there (others have posted possible explinations) but I have something that solves some of my problems with view_source: http://docwhat.gerf.org:9673/view_source/view_source My view_source checks the meta_types and tries to act accordingly. BTW: Does anyone have a 'highliter' I can run the document_src output through? Sort of like the Show_Source() function in PHP? Of course, I'd want to tweak it to add HREF's for URLs (I have a pending bug in PHP about that....Now I don't really care, my site's going to be Zope soon....;) Ciao! -- Famous Last Words: That was the wrong button! The Doctor What: Un-Humble http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
participants (3)
-
Anders Eriksson -
Oleg Broytmann -
The Doctor What