Got a solution to the problem. Now 'manage' looks like this:
@expose("cmssite.templates.doc_manage")
def manage(self, tg_errors=None, tg_exceptions=None):
if tg_errors:
flash("Error: " + str(tg_errors))
if tg_exceptions:
flash("Exception: " + str(tg_exceptions))
if hasattr(cherrypy.request.usersite):
usersite = cherrypy.request.usersite
else: # being called by error_handler
usersite = cherrypy.request.input_values['usersite']
value = {'name' : '',
'content' : None,
'usersite' : usersite # hidden field
}
return dict(form=doc_add_form,
action='/doc_controller/add_doc',
value=value)
thanks a lot!
sanjay
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---