[Zope] DTML method --> PythonScript

Evan Simpson evan@4-am.com
Tue, 13 Mar 2001 10:37:09 -0500


From: Timothy Wilson <wilson@visi.com>
> schoolmenu = SchoolMenuClass.createInObjectManager(REQUEST['id'], REQUEST)
> schoolmenu.propertysheets.Basic.manage_editProperties(REQUEST)
> schoolmenu.reindex_object()
>
> if REQUEST.has_key(DestinationURL):
>   return RESPONSE.redirect(DestinationURL+'/manage_workspace')
> return RESPONSE.redirect(URL2+'/manage_workspace')

This has a few problems.  Try this (tested):

REQUEST = container.REQUEST
schoolmenu = container.SchoolMenuClass.createInObjectManager(REQUEST['id'],
REQUEST)
schoolmenu.propertysheets.Basic.manage_editProperties(REQUEST)
schoolmenu.reindex_object()

RESPONSE = REQUEST.RESPONSE
if REQUEST.has_key('DestinationURL'):
  return RESPONSE.redirect(REQUEST['DestinationURL']+'/manage_workspace')
return RESPONSE.redirect(REQUEST['URL2']+'/manage_workspace')


Cheers,

Evan @ digicool & 4-am