Sometimes I want to register a view or suite of views conditionally;
e.g., to add development views only if a 'debug' setting is true. It
looks like this is impossible with '@view_config': there's no way to
disable it if the setting is false. This is causing me to to register
conditional views with config.add_view() in an include function, which
then means I'm registering some views one way and some another way,
which is messy.

The only way around this I can think of is to exclude the module from
the general scan, and to only scan it if the setting is true. But that
means I have to put the module outside the views/ package, which is
also messy.

Is there another way to do this?

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