On Mon, Mar 14, 2011 at 9:02 AM, vamsy krishna <[email protected]> wrote:
> I'm facing a new problem now. I have a defined a custom error page and
> using the handler413 in my urls file to load this template. However
> this is not getting picked up. I would like to handle this at django
> level instead of apache. The ErrorDocument definition in apache works
> fine.
>
> Also the handler404 and handler500 are working without any issue. Can
> someone point me in the right direction?
>
> Thanks,
> Vamsy
>

handler404 and handler500 get called if django tries to serve a page
that doesn't exist or a page that errors. Your 413 is generated from
apache, and so does not ever call django, therefore django cannot
handle this error.

To get around this, set

ErrorHandler 413 /some/django/url

Apache will use an internal redirect to fetch this URL, so it should
be transparent to your users.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.

Reply via email to