Nevermind, I figured it out.  But, I'd like some affirmation that I'm doing
this the 'correct' way or if you see problems with what I'm doing.
 
I am using the exception_handler decorator to handle the exception and then
flashing the value passed back in tg_exceptions.  It seems to be working
well for me thus far.  Any comments?
 
            -Jim
 
  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jim Steil
Sent: Wednesday, January 17, 2007 4:44 PM
To: [email protected]
Subject: [TurboGears] Handling exceptions raised in the model
 
Hi:
 
I'm trying to enforce some rules on my data in my model.  I have my model
raising an error whenever it finds a problem with the data.  I then catch
the exception in my controller and want to redisplay my page with the error
and existing data.  Is there an easy way to redisplay the existing page with
a flash message on it and retain all of the current data?  I know that I
could define validations and use the decorator, but it seems to be more
useful to me to define the rules in the model where I can take advantage of
them in other applications.  Am I missing something obvious?
 
            -Jim
 
 
 




--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to