Re: Fw: [Zope] some Zope issues: dtml-zpt, permissions, scalability
----- Original Message ----- From: "Paul Winkler" <pw_lists@slinkp.com> To: <zope@zope.org> Sent: Thursday, November 20, 2003 3:50 PM Subject: Re: [Zope] some Zope issues: dtml-zpt, permissions, scalability
That seems unlikely. Can you post your ZPT version, and the actual error
it
gives you?
Here is what I and what I receive as error: <form action="." method="post"> <table border=0 cellpadding=2 cellspacing=0 width="100%"> <tr> <td colspan=5> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="right"> <input type="submit" name="index_html:method" value="View"> <select size=1 name="SelectedGroup"> <option value="All">All Groups</option> <span tal:repeat="group python:here.listGroups"> <option value="group" tal:attributes="value group"> <span tal:condition="JobTracker/SelectedGroup"> <span tal:condition="repeat/group/index==here/SelectedGroup">selected</span> </span> <span tal:replace="group">group</span> </option> </span> </select> </td> </tr> </table> </td> </tr> </table> </form> ________________________________________________________________________ Site Error An error was encountered while publishing this resource. Unauthorized Sorry, a site error occurred. Traceback (innermost last): * Module ZPublisher.Publish, line 150, in publish_module * Module ZPublisher.Publish, line 114, in publish * Module Zope.App.startup, line 199, in zpublisher_exception_hook * Module ZPublisher.Publish, line 98, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module Shared.DC.Scripts.Bindings, line 252, in __call__ * Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec * Module Products.PageTemplates.PageTemplateFile, line 96, in _exec * Module Products.PageTemplates.PageTemplate, line 95, in pt_render <PageTemplateFile at /jobber/> * Module TAL.TALInterpreter, line 200, in __call__ * Module TAL.TALInterpreter, line 244, in interpret * Module TAL.TALInterpreter, line 634, in do_loop_tal * Module Products.PageTemplates.TALES, line 205, in setRepeat * Module Products.PageTemplates.TALES, line 220, in evaluate URL: index_html Line 26, Column 2 Expression: <PythonExpr here.listGroups> Names: {'container': <JobTracker at /jobber>, 'default': <Products.PageTemplates.TALES.Default instance at 0x86a0664>, 'here': <JobTracker at /jobber>, 'loop': <SafeMapping instance at 86e4900>, 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x8689cc4>, 'nothing': None, 'options': {'args': ()}, 'repeat': <SafeMapping instance at 86e4900>, 'request': <HTTPRequest, URL=http://localhost:8080/jobber/index_html>, 'root': <Application instance at 8aa1c18>, 'template': <PageTemplateFile at /jobber/>, 'traverse_subpath': [], 'user': meyer} * Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__ __traceback_info__: here.listGroups * Module Python expression "here.listGroups", line 2, in f Unauthorized: You are not allowed to access listGroups in this context (Also, an error occurred while attempting to render the standard error message.) ________________________________________________________________________
On Fri, Nov 21, 2003 at 08:54:28AM +0100, Andre Meyer wrote:
Here is what I and what I receive as error:
<form action="." method="post"> <table border=0 cellpadding=2 cellspacing=0 width="100%"> <tr> <td colspan=5> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="right"> <input type="submit" name="index_html:method" value="View">
<select size=1 name="SelectedGroup"> <option value="All">All Groups</option> <span tal:repeat="group python:here.listGroups">
You realize that that will try to iterate over the listGroups object itself, rather than calling listGroups? If listGroups is something you need to call, then do one of these: <span tal:repeat="group python:here.listGroups()"> <span tal:repeat="group here/listGroups"> It's roughly equivalent to the difference between <dtml-in listGroups> and <dtml-in "listGroups"> (snip)
* Module Python expression "here.listGroups", line 2, in f
Unauthorized: You are not allowed to access listGroups in this context
That's a bit puzzling. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's SLICK PROCTOLOGIST GOURANGA! (random hero from isometric.spaceninja.com)
participants (2)
-
Andre Meyer -
Paul Winkler