Anders Eriksson writes:
... view source traceback ... (Object: standard_html_header) AttributeError: __call__
That is very strange as "standard_html_header" does have a "__call__" method. Thus, I can not tell you, why you see this behaviour. However, you may use "document_src" directly in the URL. I.e. you do not need a special DTML method 'view_source". Try something like this: http:..../index_html/document_src I know, it would be nicer to use "view_source" but .... Dieter
Hello Dieter, Friday, November 24, 2000, 10:06:22 PM, you wrote: DM> Anders Eriksson writes: DM> > ... view source traceback ... DM> > (Object: standard_html_header) DM> > AttributeError: __call__ DM> That is very strange as "standard_html_header" does have DM> a "__call__" method. DM> Thus, I can not tell you, why you see this behaviour. Maybe I have something wrong in my standard_html_header? It's kind of complex (.I have copied it.) I will remove it and try again. DM> However, you may use "document_src" directly in the DM> URL. I.e. you do not need a special DTML method 'view_source". DM> Try something like this: DM> http:..../index_html/document_src DM> I know, it would be nicer to use "view_source" but .... AFAIU there is two problems with using document_src directly 1) I can't use the html_quote param 2) Anonymously users can't use this on 'standard' Zope. I tried on zope.org but it want me to log in. Using view_source I don't need to do this. This can of cause be me misunderstanding ;-) Thanks for your reply! -- Best regards, Anders mailto:ame@swipnet.se
Anders Eriksson writes:
DM> ... use "document_src" to view the source ...
AFAIU there is two problems with using document_src directly 1) I can't use the html_quote param You do not need to (unless you are interested in standard wrapping for e.g. corporate identity or navigation). "document_src" sets "Content-Type: text/plain". Thus, you get the content as text, no HTML processing.
2) Anonymously users can't use this on 'standard' Zope. I tried on zope.org but it want me to log in. Using view_source I don't need to do this. You are right!
I just checked: "document_src" requires the permission "View management screens". Either, you must give your annonymous users this permission for the respective objects or you must wrap "document_src" into a DTML method with an appropriate proxy role. The code of the method could just be: <dtml-var "document_src(REQUEST,RESPONSE)"> Dieter
participants (2)
-
Anders Eriksson -
Dieter Maurer