Thanks Tom. I also looked up the Django code and realised there is no
handler413 defined. I'm now doing it in apache the way you mentioned.

On Mar 14, 4:38 pm, Tom Evans <tevans...@googlemail.com> wrote:
> On Mon, Mar 14, 2011 at 9:02 AM, vamsy krishna <badguitar...@gmail.com> 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 django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to