Running polls tutorial, see the error message "The empty path didn't match any of these."

2,201 views
Skip to first unread message

Chunjing Jia

unread,
Feb 24, 2018, 7:56:10 PM2/24/18
to Django users
Hi,

I am running Django 2.0 tutorial01 for polls. I am seeing this error message 

Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:

  1. polls/
  2. admin/
The empty path didn't match any of these.

Without adding polls, my code works fine, and I can see the rocket and congratulation page. But after adding polls, I always get this error message. Even if I use the example code that I found from github with the all the correct setting... 

Does this mean that my installation for Python3 and Django 2.0 may be problematic? What other possibles error may be here? 

Thanks a lot!

Best,
CJ

Dylan Reinhold

unread,
Feb 24, 2018, 10:23:25 PM2/24/18
to django...@googlegroups.com
What you are seeing is correct.
That congratulations page is only displayed by django when you have no url's defined other than admin. Once you add your first URL django gets out of the way and does not show that splash screen.

The error is saying you do no have anything defined in your URLs as / (or empty), The polls app is in /polls/ (http://localhost:8000/polls/). Which at this point in the tutorial is correct.

Dylan

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7663c42a-06fc-4fc5-9604-dd92143c7ab3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chunjing Jia

unread,
Feb 25, 2018, 4:36:27 PM2/25/18
to Django users
Thank you Dylan! Now I see what's going on there.

Best,
Chunjing

Jose M.

unread,
Dec 30, 2019, 12:20:23 PM12/30/19
to Django users
Thansk you are the man! yep this helped me in 2019! Cheers!


On Saturday, February 24, 2018 at 10:23:25 PM UTC-5, Dylan Reinhold wrote:
What you are seeing is correct.
That congratulations page is only displayed by django when you have no url's defined other than admin. Once you add your first URL django gets out of the way and does not show that splash screen.

The error is saying you do no have anything defined in your URLs as / (or empty), The polls app is in /polls/ (http://localhost:8000/polls/). Which at this point in the tutorial is correct.

Dylan
On Sat, Feb 24, 2018 at 3:09 PM, Chunjing Jia <jiac...@gmail.com> wrote:
Hi,

I am running Django 2.0 tutorial01 for polls. I am seeing this error message 

Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:

  1. polls/
  2. admin/
The empty path didn't match any of these.

Without adding polls, my code works fine, and I can see the rocket and congratulation page. But after adding polls, I always get this error message. Even if I use the example code that I found from github with the all the correct setting... 

Does this mean that my installation for Python3 and Django 2.0 may be problematic? What other possibles error may be here? 

Thanks a lot!

Best,
CJ

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages