[Zope] How to Delete ZClass Instances programmatically??
Jean Jordaan
Jean@mosaicsoftware.com
Mon, 28 Aug 2000 13:43:12 +0200
Hi Zopers
I've found the "How-To: Adding ZClass Instances Programmatically",
but now I'm looking for the *Deleting ZClass Instances* one!
I'm trying this as a beginning (hacked from the Zope management
interface)::
<dtml-if "AUTHENTICATED_USER.has_role('ContentManager')">
<form action="<dtml-var URL0>" method="post">
</dtml-if>
[...]
<dtml-if "AUTHENTICATED_USER.has_role('ContentManager')">
<input type="checkbox" name="ids:list" value="<dtml-var id>">
</dtml-if>
[...]
<dtml-if "AUTHENTICATED_USER.has_role('ContentManager')">
<input type="submit" name="manage_delObjects:method" value="Delete">
</form>
</dtml-if>
Problems:
- it sends me to the management screen afterwards, and I'm
calling it from the public interface.
- I don't necessarily want to give the 'ContentManager' rights
to delete objects; I'd rather manage this through a delete
method with the appropriate proxy role.
Any advice or RTFM pointers?
--
Jean Jordaan -- technical writer --
Mosaic Software -- Zope 2.1.6 on WinNT and W2K