Forums

"page not found" following djangogirls tutorial

Hi, I am a newbie to python, and pythonanywhere... I followed djangogirls tutorial (http://tutorial.djangogirls.org/en/django_admin/index.html), sections "Django models" and "Django admin", but when I try my link at shayke23.pythonanywher.com/admin, I get "page not found" message.

Also, how does 127.0.0.1:8000 is related to my main URL?

I have a feeling that my admin is not configured properly, maybe something in urls.py ???

Thx!!!

http://127.0.0.1:8000/ is the address you use to access a website that is running on your own computer in front of you (which can only be accessed from that computer), while http://shayke23.pythonanywhere.com/ is the address to access a website that is running on PythonAnywhere's servers (which can be accessed from anywhere on the Internet -- it's a "proper" website).

At that point of the Django Girls tutorial, you're still only running Django on your local machine -- there's nothing running on PythonAnywhere yet, so your website is only accessible using the 127.0.0.1 address, from your local machine. The bit where you upload the app to PythonAnywhere is the next section, Deploy!. So shayke23.pythonanywhere.com won't be set up yet. Indeed, when I look at the site, it looks like it doesn't have a Django app running there yet.

Up until you have the Django app uploaded to PythonAnywhere, PythonAnywhere will just be running a default website for you, which only has a front page -- there's only a page at http://shayke23.pythonanywhere.com/, nothing at http://shayke23.pythonanywhere.com/admin/

So at this point in the tutorial, you need to access the site on your own machine, using http://127.0.0.1:8000/admin/. That should work just fine. And then, once you've got to the end of the page you're on and you do the next page (the "Deploy!" one) then you'll be able to access everything the version you've uploaded to http://shayke23.pythonanywhere.com/admin/