does anyone know how to test if we're in a 'static' view or route ?

7 views
Skip to first unread message

Jonathan Vanasco

unread,
Feb 8, 2012, 1:32:07 PM2/8/12
to pylons-discuss
i've got some debugging info on event subscribers; i'd like keep them
from running on the static elements / debug toolbar, etc

Chris McDonough

unread,
Feb 8, 2012, 1:45:14 PM2/8/12
to pylons-...@googlegroups.com
On Wed, 2012-02-08 at 10:32 -0800, Jonathan Vanasco wrote:
> i've got some debugging info on event subscribers; i'd like keep them
> from running on the static elements / debug toolbar, etc

The view isn't yet found when a NewRequest or ContextFound event is
sent, so no "API way" if you're using either of those, although you can
always use request.path_info to filter.

- C


Jonathan Vanasco

unread,
Feb 8, 2012, 1:52:15 PM2/8/12
to pylons-discuss
thanks!

Iain Duncan

unread,
Feb 10, 2012, 1:11:48 PM2/10/12
to pylons-...@googlegroups.com
Is there an API way that would work from within a wrapper view?

thanks
Iain

Reply all
Reply to author
Forward
0 new messages