[Zope] manage_changeProperties Question

complaw@hal-pc.org complaw@hal-pc.org
Wed, 15 May 2002 23:44:29 GMT


Forget it.  Used a different tactic.  The following python script works...

for obj in context.objectValues('DTML Document'):
  obj.manage_changeProperties(on_host_committee=0)

I'm not sure why the DTML doesn't, however.  Hmmmm....

Sorry to bother you all.  This is the upteenth time that I've posted a message,
only to figure out the problem about 30 seconds later.

Ron


> I need to interate through a set of objects (in this case, DTML Documents) and
> set a particular boolean property to FALSE.  I looked at the documentation, and
> found something similar in the Zope Book.  However, something must be missing in
> the translation, because the following code...
> 
>   <dtml-in expr="objectValues('DTML Document')">
>      <dtml-call expr="manage_changeProperty(on_host_committee=0)">
>   </dtml-in>
> 
> ... generates an attribute error, namely:
> 
> Zope Error
> 
> Zope has encountered an error while publishing this resource.
> 
> Error Type: AttributeError
> Error Value: manage_changeProperty
> 
> Troubleshooting Suggestions
> 
>     * The URL may be incorrect.
>     * The parameters passed to this resource may be incorrect.
>     * A resource that this resource relies on may be encountering an error.
> 
> For more detailed information about the error, please refer to the HTML source
> for this page.
> 
> If the error persists please contact the site maintainer. Thank you for your
> patience.
> 
> Traceback (innermost last):
>   File /home/zope/Zope-2.4.4-src/lib/python/ZPublisher/Publish.py, line 223, in
> publish_module
>   File /home/zope/Zope-2.4.4-src/lib/python/ZPublisher/Publish.py, line 187, in
> publish
>   File /home/zope/Zope-2.4.4-src/lib/python/Zope/__init__.py, line 226, in
> zpublisher_exception_hook
>     (Object: class)
>   File /home/zope/Zope-2.4.4-src/lib/python/ZPublisher/Publish.py, line 171, in
> publish
>   File /home/zope/Zope-2.4.4-src/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
>     (Object: do_it)
>   File /home/zope/Zope-2.4.4-src/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
>     (Object: do_it)
>   File /home/zope/Zope-2.4.4-src/lib/python/OFS/DTMLMethod.py, line 200, in
__call__
>     (Object: do_it)
>   File /home/zope/Zope-2.4.4-src/lib/python/DocumentTemplate/DT_String.py, line
> 546, in __call__
>     (Object: do_it)
>   File /home/zope/Zope-2.4.4-src/lib/python/DocumentTemplate/DT_In.py, line 770,
> in renderwob
>     (Object: objectValues('DTML Document'))
>   File /home/zope/Zope-2.4.4-src/lib/python/DocumentTemplate/DT_Util.py, line
> 231, in eval
>     (Object: _.manage_changeProperty(on_host_committee=0))
>     (Info: _)
>   File <string>, line 2, in f
>   File /home/zope/Zope-2.4.4-src/lib/python/AccessControl/DTML.py, line 101, in
> guarded_getattr
>     (Object: do_it)
>   File /home/zope/Zope-2.4.4-src/lib/python/AccessControl/ZopeGuards.py, line
> 109, in guarded_getattr
> AttributeError: (see above)
> 
> 
> There isn't a whole lot of documentation on this subject, but I think there
> should be.  Does anyone have a gentle hint as to what I'm aparently missing?
> 
> TIA,
> 
> Ron
> 
> 
> 
> _______________________________________________
> 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 )