Python 2.6.2, Django 1.0.3, Windows XP, Page not found: /

I am just starting to learn Python and Django and cannot make the most basic application work. I installed Python, added python to the Path environment variable, installed Django using the install.py script.

I created the application by running the command

django-admin.py startproject my_project

updated settings.py file for database

DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'mysitedb'

Run the command

python manage.py syncdb

And finally, it all started

python manage.py runserver

At this point, everything is working successfully. When I looked at http: // localhost: 8000 / I get the error message "Page not found: /"

I originally installed Django version 1.1, but got the same error, so I uninstalled it and tried the old version 1.0.3. The thread is working. Any help would be appreciated.

+3
3

- @artran

python manage.py runserver 8001

.

python , 8000 ( http://127.0.0.1:8000/). , , localhost. , . , 8001 , , .

, , , : 8000.

+2

, URL-. , , .

0

You probably have ADMIN_MEDIA_PREFIX = ""in your settings. Django intercepts requests to this URL and tries to serve administrative media, so when you make it an empty string, it will try to intercept ALL requests, as a result of which nothing will work.

0
source

Source: https://habr.com/ru/post/1719442/


All Articles