On 28 June 2010 18:17, Tom Evans <tevans...@googlemail.com> wrote:
> On Mon, Jun 28, 2010 at 5:13 PM, Michael Cetrulo <mail2sa...@gmail.com> wrote:
>> that's incorrect, we're talking about exceptions that go back as status
>> codes not internals for the application itself.
>>
>
> django.core.exceptions.PermissionDenied is caught by
> BaseHandler::get_response() and converts it into a
> HttpResponseForbidden (django/core/handlers/base.py + 134)
And it returns http.HttpResponseForbidden('<h1>Permission
denied</h1>'), which is almost never what you actually want to return
to the user. Relevant ticket:
http://code.djangoproject.com/ticket/5515. Also, it's not really
documented anywhere and because it's outside of http module, it's hard
to find on your own.

-- 
Łukasz Rekucki

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

Reply via email to