Following this documentation (https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views), I am trying to create a custom error 403 page for my Django application.
I have created an error handler in my URLConf:
handler403 = 'courses.views.error403'
I have also created a view that handles error 403 called error403:
def error403(request):
'''
Default view for error 403: Inadequate permissions.
'''
return render_to_response('utility/mustLogin.html', {'user': request.user})
However, this view is simply not rendering. When I instigate an error 403 on purpose, the default browser 403 page merely appears as opposed to my template.

Am I forgetting to perform some action? Thank you.
The handler403 is new in the development version. If you're using an older version (<= 1.3) this option is not yet implemented.
There are some ways of accomplishing that in older versions, as described here. It involves a new middleware, a custom exception and the HttpResponseForbidden. Don't know how well it would integrate with the rest of your project, though...
Google Chrome will replace it with their generic one if the returned page is less than 512 bytes in size. They do the same with 404 responses as well.
For what it's worth Internet Explorer does the same thing.
If you make your response greater than 512bytes then all shall be well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With