#2112: [Patch] Allow overriding @require error handling
-------------------------+--------------------------------------------------
Reporter: vinces1979 | Owner: faide
Type: enhancement | Status: new
Priority: normal | Milestone: 2.0b2
Component: TurboGears | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by vinces1979):
Replying to [ticket:2112 vinces1979]:
A better usage example:
{{{
def require(predicate):
""" wrap TG's default require and override the error handler with a
customError """
@decorator
@tg_require(predicate, error_handler=customError) #: override tg's
default redirect
def check_auth(func, *args, **kwargs):
return func(*args, **kwargs)
return check_auth
}}}
--
Ticket URL: <http://trac.turbogears.org/ticket/2112#comment:2>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---