Windows 7
Python 2.7.3
Django 1.5
python manage.py runningerver
I am following the tutorial available at https://docs.djangoproject.com/en/1.5/intro/tutorial03/ '
with DEBUG = True in settings.py the web pages are created correctly. The address
http:
Displays the admin login page.
http:
displays "what?" bulleted link.
http://127.0.0.1:8000/polls/1/
displays the number '1'
http://127.0.0.1:8000/polls/2/
displays a standard 404 message. However, if I set DEBUG = False (and do nothing), I get a 500 error in ALL ADDRESSES! I am using an internal development server. No trace errors. The server log is as follows:
with DEBUG = True
0 errors found
March 19, 2013 - 12:01:12
Django version 1.5, using settings 'mysite.settings'
Development server is running at http:
Quit the server with CTRL-BREAK.
[19/Mar/2013 12:06:41] "GET /admin/ HTTP/1.1" 200 1893
[19/Mar/2013 12:54:55] "GET /polls/ HTTP/1.1" 200 74
[19/Mar/2013 12:55:02] "GET /polls/2/ HTTP/1.1" 404 1577
[19/Mar/2013 12:55:09] "GET /polls/1/ HTTP/1.1" 200 1
Validating models...
with DEBUG = False
0 errors found
March 19, 2013 - 12:55:21
Django version 1.5, using settings 'mysite.settings'
Development server is running at http:
Quit the server with CTRL-BREAK.
[19/Mar/2013 12:59:22] "GET /admin/ HTTP/1.1" 500 27
[19/Mar/2013 12:59:25] "GET /polls/ HTTP/1.1" 500 27
[19/Mar/2013 12:59:28] "GET /polls/1/ HTTP/1.1" 500 27
[19/Mar/2013 12:59:34] "GET /polls/2/ HTTP/1.1" 500 27
My directory structure is as follows:
1> mysite
2> - mysite
3> - polls
4> - templates
5> - polls
6> - templates
7> - admin
"manage.py" @1 > , , .
@2 > settings.py
@2 > urls.py
:
A. view.py '@2 > , ? "view.py" @3 > ;
B. "404.html" @2 > (@4 > @6 > )? , "500.html" .
, .