On Tue, Feb 17, 2009 at 5:53 PM, JY <[email protected]> wrote:
> Is it safe to set attributes to be used in the controller action from the
> __before__() method?

Yes.  The controller is instantiated for each request, so all
attributes are local to the request.

> Also how do I indicate that the action should be called or not, as stated by
> the doc:
>>
>> This method is called before your action is, and should be used for
>> setting up variables/objects, restricting access to other actions, or other
>> tasks which should be executed before the action is called.

It always calls the action unless there's an exception.  abort() and
redirect() raise exceptions, so they prevent the action from being
called.

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
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