Programmatically delete an object
Hi All, I am having trouble finding an example of how to programmatically delete an object from a folder in Zope. Any info or direction in this regards would be greatly appreciated. Thanks, Joel
From: "jlegris" <jlegris@telus.net>
I am having trouble finding an example of how to programmatically delete an object from a folder in Zope. Any info or direction in this regards would be greatly appreciated.
DTML: <dtml-call "manage_delObjects(pids)"> Python context.manage_delObjects(pids) where 'pids' is a list containing the object ids to be deleted (note: if you only want to delete one object then pass either a list with only one element, or a simple variable as a list: eg. [pid] ) HTH Jonathan
I'm using Apache as a frontend to zope/plone. Is it possible to configure Apache as follows : www.domain.ext should all go to the filesystem (static html files) except www.domain.ext/plone should be handled by mod_rewrite ( RewriteRule ^/(.*) http://localhost:7777/VirtualHostBase/http/www.domain.ext:80/VirtualHostRoot... [L,P] ) Any help appreciated. Kind Regards Bert De Ridder PeopleWare NV - Head Office Cdt.Weynsstraat 85 B-2660 Hoboken Tel: +32 3 448.33.38 Fax: +32 3 448.32.66 PeopleWare NV - Branch Office Geel Kleinhoefstraat 5 B-2440 Geel Tel: +32 14 57.00.90 Fax: +32 14 58.13.25
On Jan 13, 2005, at 16:43, Bert_De_Ridder@peopleware.be wrote:
I'm using Apache as a frontend to zope/plone.
Is it possible to configure Apache as follows :
www.domain.ext should all go to the filesystem (static html files) except www.domain.ext/plone should be handled by mod_rewrite ( RewriteRule ^/(.*) http://localhost:7777/VirtualHostBase/http/www.domain.ext:80/ VirtualHostRoot/$1 [L,P] )
Yes, and if you read the excellent documentation for Apache (because this question has nothing to do with Zope) at www.apache.org you can find out how. jens
Yes, I know it should be somewhere in the manuals, but call me lazy; I was just hoping someone in this list could give me a pointer to the right direction. Kind Regards Bert De Ridder PeopleWare NV - Head Office Cdt.Weynsstraat 85 B-2660 Hoboken Tel: +32 3 448.33.38 Fax: +32 3 448.32.66 PeopleWare NV - Branch Office Geel Kleinhoefstraat 5 B-2440 Geel Tel: +32 14 57.00.90 Fax: +32 14 58.13.25 Jens Vagelpohl <jens@dataflake.org> Sent by: zope-bounces@zope.org 13/01/2005 16:56 To Zope Mailing List <zope@zope.org> cc Subject Re: [Zope] Apache configuration On Jan 13, 2005, at 16:43, Bert_De_Ridder@peopleware.be wrote:
I'm using Apache as a frontend to zope/plone.
Is it possible to configure Apache as follows :
www.domain.ext should all go to the filesystem (static html files) except www.domain.ext/plone should be handled by mod_rewrite ( RewriteRule ^/(.*) http://localhost:7777/VirtualHostBase/http/www.domain.ext:80/ VirtualHostRoot/$1 [L,P] )
Yes, and if you read the excellent documentation for Apache (because this question has nothing to do with Zope) at www.apache.org you can find out how. jens _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Bert_De_Ridder@peopleware.be wrote:
I'm using Apache as a frontend to zope/plone.
Is it possible to configure Apache as follows :
www.domain.ext should all go to the filesystem (static html files) except www.domain.ext/plone should be handled by mod_rewrite ( RewriteRule ^/(.*) http://localhost:7777/VirtualHostBase/http/www.domain.ext:80/VirtualHostRoot... [L,P] )
This should work (untested naturally): RewriteRule ^/plone(.*) http://localhost:7777/VirtualHostBase/http/www.domain.ext:80/VirtualHostRoot... [L,P] But if your plone site is in a folder called plone, you should use: RewriteRule ^/plone(.*) http://localhost:7777/VirtualHostBase/http/www.domain.ext:80/plone/VirtualHo... [L,P] -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science
On Thu, 2005-01-13 at 16:43 +0100, Bert_De_Ridder@peopleware.be wrote:
I'm using Apache as a frontend to zope/plone.
Is it possible to configure Apache as follows :
www.domain.ext should all go to the filesystem (static html files) except www.domain.ext/plone should be handled by mod_rewrite ( RewriteRule ^/(.*) http://localhost:7777/VirtualHostBase/http/www.domain.ext:80/VirtualHostRoot... [L,P] )
I use a setup like this: RewriteRule ^/plone(.*) Localhost:7777/VirtualHostBase/http/www.domain.ext:80/VirtualHostRoot/$1[L,P] RewriteRule ^/(.*) /usr/local/www/static.html.location$1 [L] -- -------^.^-- Matthew Platte Lincoln Nebraska
My apache config required the use of the SiteRoot component. I have an apache web server w/SSL that I use for several things, and the zope/plone site is available under https://hostname/plone Using the Zope manage app, under my 'plone' site, I added a SiteRoot component, and set its path to /plone. In httpd.conf in the 443 virtual host area, I have: RewriteEngine on RewriteRule ^/plone(.*) http://localhost:8080/plone/VirtualHostBase/https/hostname:443/plone/Virtual HostRoot/$1 [P] If you don't need SSL, this would be: RewriteEngine on RewriteRule ^/plone(.*) http://localhost:8080/plone/VirtualHostBase/http/hostname:80/plone/VirtualHo stRoot/$1 [P] (note the two changes, https->http and 443->80) Before I added the use of the SiteRoot, I could get the page, but all the links inside the page were pointing to https://hostname and not https://hostname/plone, and all images, stylesheets, etc were broken. The SiteRoot component rewrites all the links in the page, so that stylesheets, images, etc. all show properly. FYI, in case it helps, I use apache 2.0, Zope 2.7.3 and Plone 2.0.5. Good luck, Larry
Larry Silverman wrote:
My apache config required the use of the SiteRoot component. I have an apache web server w/SSL that I use for several things, and the zope/plone site is available under https://hostname/plone
SiteRoots are very very evil and need to go away.
Using the Zope manage app, under my 'plone' site, I added a SiteRoot component, and set its path to /plone.
In httpd.conf in the 443 virtual host area, I have: RewriteEngine on RewriteRule ^/plone(.*) http://localhost:8080/plone/VirtualHostBase/https/hostname:443/plone/Virtual HostRoot/$1 [P]
If you don't need SSL, this would be: RewriteEngine on RewriteRule ^/plone(.*) http://localhost:8080/plone/VirtualHostBase/http/hostname:80/plone/VirtualHo stRoot/$1 [P] (note the two changes, https->http and 443->80)
Before I added the use of the SiteRoot, I could get the page, but all the links inside the page were pointing to https://hostname and not https://hostname/plone, and all images, stylesheets, etc were broken.
The corect way to solve this is to change, for example, your non-ssl example would become... http://localhost:8080/plone/VirtualHostBase/http/hostname:80/VirtualHostRoot... [P] cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
----- Original Message ----- From: "jlegris" <jlegris@telus.net> To: <zope@zope.org> Sent: Monday, December 13, 2004 4:45 PM Subject: [Zope] Programmatically delete an object
Hi All,
I am having trouble finding an example of how to programmatically delete an object from a folder in Zope. Any info or direction in this regards would be greatly appreciated.
Thanks,
Joel
Joel, Do a net search on "zope" and "manage_delete". I have forgotten the symantics. Its something like: arent-container.Manage_delete(id of the folder you want to delete) This can be called from a python script or dtml or zpt. David
participants (9)
-
Bert_De_Ridder@peopleware.be -
Chris Withers -
David Hassalevris -
Jens Vagelpohl -
jlegris -
Jonathan Hobbs -
Larry Silverman -
Matt Platte -
Max M