On Tue, 2007-11-20 at 02:22 -0800, Rufman wrote:
> Hey
> 
> I know that django has error handlers for errors 404 and 500.
> My question: Could I just make my own handler and add it to the
> defaults in django.conf.urls.defaults? (for example 403 Forbidden)

The question doesn't make sense. 404 and 500 status codes are special
cases in that they are generated in response to certain exceptions. All
other status codes are generated directly by your views by returning an
HttpResponse and setting the status code (or returning one of the
special classes in django/http/__init__.py).

So there's no reason to be generating the other status codes via the
default handlers: you're execution path will never get to the point
where the request/response handler (wsgi.py or modpython.py) is handling
an exception for some other response code.

Regards,
Malcolm


-- 
If you think nobody cares, try missing a couple of payments. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to