Superb answer. To the point, relevant and accurate. Very helpful. I don't understand the intent of the other two answers. Chastising? Thank you Liu Zheng...
On Saturday, July 18, 2020 at 6:48:18 AM UTC-7, Liu Zheng wrote: > > I believe you were following the official tutorial on Django's website, > and has created a view function called "index" in "polls" app, which was > wired to "/polls" url. All the codes were exactly the same as provided in > the tutorial. The mistake you made was when you opened the browser and > typed "http://localhost:8000/index". You shouldn't view "/index". It's > the name of the view function, not the name of the end point. As you can > see on the error page, you provided views at "polls/" and "admin/". So you > just go to "http://localhost:8000/polls" and will see your page there. > > On Saturday, July 18, 2020 at 5:21:25 AM UTC+8, Ralph Barhydt wrote: >> >> >> I have done the first part of the tutorial many times and suddenly, doing >> it one more time, I get this message. I am in the right directory and I >> have checked the code in urls.py many time as well. What is going on? >> >> >> >> >> >> ``` >> Page not found (404) >> Request Method: GET >> Request URL: http://localhost:8000/index >> >> Using the URLconf defined in rbsite.urls, Django tried these URL >> patterns, in this order: >> >> 1. polls/ >> 2. admin/ >> >> The current path, index, didn't match any of these. >> >> You're seeing this error because you have DEBUG = True in your Django >> settings file. Change that to False, and Django will display a standard >> 404 page. >> >> ``` >> > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/29aea367-987c-4ebe-a3f3-6c4008d11126o%40googlegroups.com.