HTTPForbidden is exactly what I throw in the traversal code, which
then get mapped to the login view. If I throw HTTPForbidden again in
the login view, it will result in 500 Internal Server Error, thus I
manually create a 403 response and return that instead.

On Feb 9, 9:13 am, Jonathan Vanasco <jonat...@findmeon.com> wrote:
> i don't use traversal... but can't you just use an httpexception?
>
> http://readthedocs.org/docs/pyramid/en/1.0-branch/api/httpexceptions....
>
>      class HTTPForbidden(detail=None, headers=None, comment=None,
> body_template=None, **kw)
>      subclass of HTTPClientError
>      This indicates that the server understood the request, but is
> refusing to fulfill it.
>      code: 403, title: Forbidden
>
> from pyramid import httpexceptions
> ....
> return httpexceptions.HTTPForbidden()

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to