[Answer]-Unable to provide a template for error 403

1👍

The trouble is, you are not raising a 403 exception (as you did for the 404), but simply returning a response with a status code of 403. As the docs show, you need to raise django.views.defaults.permission_denied to trigger the 403 page.

from django.core.exceptions import PermissionDenied
...
raise PermissionDenied

Leave a comment