Custom error templates in a single Django application
|Reported by:||José Luis Patiño Andrés||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I think there is a limitation in the customized error views that can be reviewed. There is the feature of customizing error pages (like 404 or 500 errors) for a single app.
I will explain the problem: if you want to write a custom template for those errors, following the Django documentation (http://docs.djangoproject.com/en/1.2/topics/http/views/#customizing-error-views ) you can get it specifying the 'handler404' and 'handler500' in the urls.py file and creating the appropiate views for it. But this does not work when you have some apps with their owns urls.py files and you try to do it in a single app. The developer is forced to use only one customized error view for the whole Django project.
I have searched in internet to make me sure that is not possible, and I met other django programmers that have found the same problem. There are more or less tricky solutions to this specific request, but the ideal should be to do it in the same way that we do for the whole project, as it is explained in the Django documentation.
I think this is the correct place to make this kind of requests. If it's not, please excuse me. I am not requesting for tech support, My ticket is only a feature request.
Thanks a lot for your time.
Change History (6)
comment:1 Changed 6 years ago by
|Patch needs improvement:||unset|
|Status:||new → closed|