I have a controller sort of like this:

def view_user(self, user_id):
    u = model.User.get(user_id)
    return dict(u=u)

I use a validator to convert user_id into an integer already.  Then I
look up the relevant user.

I'd like some way of handling the scenario where I get a perfectly
valid integer, but not a valid user ID.

I know I could handle this inside the controller, but I wonder if
anyone else has experimented with doing this in the validator.

What are the merits and disadvantages of this approach?
--~--~---------~--~----~------------~-------~--~----~
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