[Zope] namespace problems

Gary Lowder gary@lowder.com
Sun, 28 Jan 2001 15:21:31 -0600


As an aside: I can get the mess below to work with a python script, BUT,
I don't know how to do the URL redirect with python as it's listed in
the DTML Method.

(python script snippet)

context.manage_addFolder(name, name)

doc=getattr(context, name)
doc.manage_addProperty('number', number, 'int')
doc.manage_addProperty('exp_date', exp_date, 'date')

How would I do the URL redirect using an equivalent to the
<dtml-call "RESPONSE.redirect(URL1)">   that's in the DTML Method below?

Many thanks again for your time and effort.
Gary.

Gary Lowder wrote:
> 
> I'm currently trying to add a new folder to an old folder, using input
> from a calling form, then add two properties to that new folder.  I
> searched the mailing list, and came up with an example that led me to
> the following, but I'm still getting "Error Type: NameError" "Error
> Value: manage_addProperty".
> 
> Where is my mistake?
> 
> <dtml-comment> The following line works as expected.</dtml-comment>
> 
> <dtml-call "manage_addFolder(name)">
> 
> <dtml-comment>Something below here isn't right.</dtml-comment>
> 
> <dtml-with "_.getitem(name)">
>   <dtml-call "manage_addProperty(id='number', value=number,
> type='int')">
>   <dtml-call "magage_addProperty(id='exp_date', value=exp_date,
> type='date')">
> </dtml-with>
> 
> <dtml-call "RESPONSE.redirect(URL1)">
> 
> Thanks for you help!
> Gary.
> 
> _______________________________________________
> 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 )