Hi Amor,
Thanks a lot for the nice and vital suggestion! My things now work fine
for exceptions. But still facing problem for validation errors. Below I
am presenting what problem I am now facing:
> def default(self, usersite, url1=None, url2=None):
> cherrypy.request.usersite = usersite
done.
> def save(...):
> usersite = cherrypy.request.usersite
gives the error 'cherrypy.request.usersite' not defined. I think
because it's a new request, generated while the form is submitted for
saving.
So, I tried passing usersite as a hidden field in the form, and than
writing 'save' like this:
@expose()
@turbogears.validate(form=form)
@turbogears.error_handler(manage)
@turbogears.exception_handler(manage)
def save(self, **data):
cherrypy.request.usersite = data['usersite']
Now, this works fine for exceptions. But if a form validation error
occurs, it calls manage, but before cherrypy.request.usersite is
assigned. So, back to square one.
Needing further guidence. 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
-~----------~----~----~----~------~----~------~--~---