Opened 6 months ago
Closed 6 months ago
#35379 closed Uncategorized (invalid)
Possible error in documentation
Reported by: | NobitaNoobie | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 5.0 |
Severity: | Normal | Keywords: | Documentation fault |
Cc: | NobitaNoobie | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
With reference to the tutorial: https://docs.djangoproject.com/en/5.0/intro/tutorial01/
While running the demo polls app in my development server I received the following error message:
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
polls/
admin/
The empty path didn’t match any of these.
But when I changed the mysite\urls, likeso,
urlpatterns = [
path("", include("polls.urls")),
path("admin/", admin.site.urls),
]
I was able to display the desired response. Please check!
Hello! Thank you for trying out Django (it's my favourite framework, hope you like it)
In these docs it says:
What I suspect is you've gone to http://localhost:8000/ (the page that used to show a rocket). The way you've updated the
urlpatterns
means would (as you said) show you the desired response at http://localhost:8000/We also have an explicit note in the docs about that 'Page not found error'
So good news, you're not the only person who thought they found an issue here, but I will close this ticket as there isn't a bug in the docs and I think the warning note is quite clear.
In future, you might want to use our user support channels if you come across something in your journey with Django. These are the best places to get support 👍