Fehler im script?

Django, Flask, Bottle, WSGI, CGI…
Antworten
vlad

Hallo zusammen,

Ich moechte ein Product erstellen, aber ich scheitere schon am Anfang.

Wo mache ich hier den Fehler


# Script (Python) "add"
# Parameter: id, title, REQUEST=None
"""
Kopiere zum aufrufenden Ordnener
"""
exhibit=context.manage_clone(container.exhibitTemplate,id)
exhibit.manage_changeProperties(title=title)
if REQUEST is not None:
try: u=context.DestinationURL()
except: u=REQUEST['URL']
REQUEST.RESPONSE.redirect(u+'/manage_main?update_menu=1')

Meine DLML Methode addForm übergibt die variable "id" als "POST", Nur beim aufrufen vom Product und Eingabe vom Namen"id" sagt Zope mir:


Error Type: NameError
Error Value: global name 'id' is not defined
Troubleshooting Suggestions
This resource may be trying to reference a nonexistent object or variable global name 'id' is not defined.
The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering an error.

Dieses beispiel habe ich aus einem Buch. Was mache ich falsch.
Antworten