http/__init__.py describe Http404 Exception as:

class Http404(Exception):
    pass

You can make own Exception:

class Http403(Exception):
    pass

For 403 Response do you have HttpResponseForbidden in other Hand.

Jonas Obrist schrieb:
> I don't quite understand why I can raise a Http404 but not for example a 
> Http403.
>
> I think one should be able to either raise all Http error codes (4xx, 
> 5xx) or none. And I'd prefer being able to raise them as Exceptions
>
> >
>
>   


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

Reply via email to