askedrelic / django-book

A revival of Django Book, the comprehensive guide to Django, overhauling it for Django 1.4 compatibility
http://django-book.readthedocs.org/en/latest/
Other
55 stars 22 forks source link

Chapter 3 -- A quick note about 404 errors: #8

Open esacteksab opened 12 years ago

esacteksab commented 12 years ago

django-book/en/_build/html/chapter03.html#a-quick-note-about-404-errors

Numerous mentions of 404

I wonder if some of this should be tied in?

https://docs.djangoproject.com/en/1.4/releases/1.4-alpha-1/#django-conf-urls-defaults https://docs.djangoproject.com/en/dev/howto/error-reporting/#errors https://docs.djangoproject.com/en/1.4/topics/http/urls/#error-handling << FWIW HTTP 403 is new in 1.4

askedrelic commented 12 years ago

It looks like Appendix G (and H, which seems to be a dupe) covers Requests in more detail. I would say it might be worth extending the Appendix G to cover basic HTTP status codes and the 403 response, when/why to use it vs 404.

And maybe how to customize it? It seems like the django docs are sparse on that: https://docs.djangoproject.com/en/1.4/topics/http/views/#http-forbidden-view

I like using a themed 403 handler as an error handled for some specific views sometimes.