Opened 10 years ago
Closed 10 years ago
#22946 closed Cleanup/optimization (wontfix)
Improvement in Tutorial for newbie https://docs.djangoproject.com/en/1.5/intro/tutorial03/
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.5 |
Severity: | Normal | Keywords: | Error404 |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
I am a new bie learning django and currently on https://docs.djangoproject.com/en/1.5/intro/tutorial03/
Suggestion :
Link : https://docs.djangoproject.com/en/1.5/intro/tutorial03/
Heading : Write a 404 (page not found) view :it mentions
When you raise Http404 from within a view, Django will load a special view devoted to handling 404 errors. It finds it by looking for the variable handler404 in your root URLconf (and only in your root URLconf; setting handler404 anywhere else will have no effect), which is a string in Python dotted syntax
however it is not specified where exactly we need to specify handler404 from example point of view .after some googling i found out that it must be set in urls.py file , however if we have this information on the main page it will save time .
Another similar problem is they ask us to change DEBUG = False if we want to use a template for 404 , however making DEBUG=False causes server error 500 . Again after goggling i found that problem is due to ALLOWED_HOSTS = [] setting and ALLOWED_HOSTS = * for example may help .
It will be great to have this in the documentation as documentation helps more and more people learn and develop using the module .
Thanks
Paarth
Change History (2)
comment:1 by , 10 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Actually this text (for both issues) has been removed in the tutorial for versions of Django 1.6 and later. Since 1.5 will soon be unsupported once 1.7 is officially released, I'm going to mark this as "won't fix".
To the reporter: I'd encourage you to use a more recent version of Django and the corresponding tutorial.
Sure, we could add (that is repeat) that the root URLconf is
mysite/urls.py
in the turorial code.However, I'm not following you about the
DEBUG
issue, as there is already a warning with a big warning icon to tell that. I don't think we can do much.