#9464: 404 section of tutorial part 3 is unclear, and not complete
-----------------------------------+----------------------------------------
 Reporter:  Grahack                |       Owner:  nobody    
   Status:  new                    |   Milestone:            
Component:  Documentation          |     Version:            
 Keywords:  tutorial, error pages  |       Stage:  Unreviewed
Has_patch:  0                      |  
-----------------------------------+----------------------------------------
 In [http://docs.djangoproject.com/en/dev/intro/tutorial03/#write-a-404
 -page-not-found-view this section about 404] of the tutorial part 3, I
 find this list unclear.
   * The 404 view is also called if Django doesn't find a match after
 checking every regular expression in the URLconf.
   * If you don't define your own 404 view -- and simply use the default,
 which is recommended -- you still have one obligation: To create a
 `404.html` template in the root of your template directory. The default
 404 view will use that template for all 404 errors.
   * If `DEBUG` is set to `True` (in your settings module) then your 404
 view will never be used, and the traceback will be displayed instead.

 I'd prefer starting with the last item. Also, when `DEBUG` is set to
 `False` and if you didn't create a `404.html` file, you get an error 500.
 I think this should be explained here.

 I'd suggest:
   * If `DEBUG` is set to `True` (in your settings module) then your 404
 view will never be used, and the traceback will be displayed instead.
   * The 404 view is also called if Django doesn't find a match after
 checking every regular expression in the URLconf.
   * If you don't define your own 404 view -- and simply use the default,
 which is recommended -- you still have one obligation: To create a
 `404.html` template in the root of your template directory. The default
 404 view will use that template for all 404 errors.
   * If `DEBUG` is set to `False` (in your settings module) and if you
 didn't create a `404.html` file, an `Http500` is raised.

 BTW I don't like this 500 feature but this is another story. I'd prefer
 the server to just send a 404 Not Found.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9464>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to