On Thu, 2008-07-03 at 08:40 -0700, Aljosa Mohorovic wrote:
> if i call raise Http404("my message") and i set custom view to handle
> 404 errors how do i get "my message" in that view?

You don't. The default 404 handler serves up a template and passes it
the request path, that is all.

If you want a more customised look, then don't raise the Http404
exception, but rather return a HttpResponseNotFound(), containing
whatever template you like. This might mean you have to catch the
Http404 exception at some point in your view code if it's raised from
the internals and return the right response, rather than letting it go
through to the default handler.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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