Forums

Page not found (404)

Hi folks!

I am a complete noob. I am trying to get the official django 1.9 tutorial up and running here but can't get past PART-1. I am trying to do this with a mysql database and not the default sqlite. The error that I am getting on the webpage is as follows:

Page not found (404)
Request Method: GET
Request URL:    http://avamaity.pythonanywhere.com/
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^admin/
^polls/
The current URL, , didn't match any of these.

I suppose that this is a case of wrong inputs in the urls.py files. I have set up the polls/urls.py and mysite/urls.py exactly as indicated in the tutorial. So, what am I missing here?

Hi there,

The error message is trying to giv e you the answer -- it's saying that your urls are only defined for /admin/ and for /polls/, but you asked for "" -- nothing, or the root URL, which is the same as just /, and you haven't defined a urls entry for that yet.

Try visiting http://avamaity.pythonanywhere.com/polls/ or http://avamaity.pythonanywhere.com/admin/

Thanks! Resolved.

This was really helpful. Could this be added as a "note" to the tutorial? https://help.pythonanywhere.com/pages/FollowingTheDjangoTutorial

We can't really add a note for every thing that someone could miss in the tutorial, because then the tutorial itself would just be swamped with notes.