#29394: Broken urls.py instructions in tutorial 1
-------------------------------+--------------------------------------
Reporter: Jln Wntr | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 2.0
Severity: Normal | Resolution: invalid
Keywords: tutorial | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => invalid
Comment:
So this is in the [https://docs.djangoproject.com/en/2.0/intro/tutorial01
/#write-your-first-view Write your first view] section, in the
`mysite/urls.py` snippet.
The full snippet reads:
{{{
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]
}}}
The part you're missing there is:
{{{
from django.urls import include, path
}}}
Note that it imports `include`, which is exactly the solution from the
StackOverflow thread.
--
Ticket URL: <https://code.djangoproject.com/ticket/29394#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.6a65bf37d1199f8c078a46d50ad6e730%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.