Jonathan Vanasco wrote:
> this thread had me thinking...
> 
> it would be really neat if there were a way to cancel out the jsonify
> decorator in a function
> 
> ie:
> 
> @jsonify
> def index(self):
>    rVal= { 'status': 'error' }
>    self.jsonify_cancel()
>    return rVal
> 
> i can't remember why i wanted to do this, but i had a good reason to
> the other day!

Maybe something like this:

class HTTP_OK(HTTPException):
   code = 200
   message = 'OK'

raise HTTP_OK('some message')

A little weird.  But a good way to break out of the decorators.

-- 
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to