On Tue, Jul 17, 2012 at 8:53 PM, askel <[email protected]> wrote:
> Hi Isaac,
>
> I'm not a Pyramid expert but I'd play with mapper parameter of
> add_view or view_config for that.

Thanks, but I found what I was looking for:

    from pyramid.view import notfound_view_config

    @notfound_view_config(containment=Foo, renderer='json')
    def fallback(request):
        return {'fallback': True, 'view': request.view_name}

Considering that the traversal tree is location aware (with the
__parent__ and __name__ thing), it works as a charm.

Cheers.

-- 
Isaac Jurado
Internet Busines Solutions eConcept

"Everyone knows that debugging is twice as hard as writing a program in
the first place. So if you're as clever as you can be when you write it,
how will you ever debug it?"

Brian W. Kernighan

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