Peter Koppatz wrote:
Hi,
with formlib I want's to add a new object to a container. This is done
with AddForm.
If an object with the same name already exists I want to redirect to
this object in the container.
How is this achieved?
The last line I found with google but dosn't work because there is no
package with a method getAbsoluteURL.
def create(self, data):
if data['name'] in self.context.__parent__:
self.request.response.redirect(getAbsoluteURL(self.context.__parent__,self.request))
This will help you:
from zope.traversing.browser.absoluteurl import absoluteURL
Thanks I advance,
Peter
------------------------------------------------------------------------
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users