[Django] #29231: Documentation Regression for Tutorial 03

12 views
Skip to first unread message

Django

unread,
Mar 16, 2018, 4:18:53 PM3/16/18
to django-...@googlegroups.com
#29231: Documentation Regression for Tutorial 03
-----------------------------------------+------------------------
Reporter: Paul | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
It looks like this issue may have been fixed in the past, but
documentation version 1.7 onward do not mention this. It is also not
mentioned in Tutorial 04.
The tutorial is missing a reference to adding the namespace to the
mysite/urls.py as follows:
{{{
from django.contrib import admin
from django.urls import path, include

urlpatterns = [
- path('polls/', include('polls.urls')),
+ path('polls/', include('polls.urls', namespace="polls")),
path('admin/', admin.site.urls),
]
}}}

Without this change, it gives an NoReverseMatch error, "polls" is not a
registered namespace

Could the tutorial be updated to include this change?
[[https://docs.djangoproject.com/en/2.0/intro/tutorial03/#namespacing-url-
names]]

--
Ticket URL: <https://code.djangoproject.com/ticket/29231>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 16, 2018, 6:18:33 PM3/16/18
to django-...@googlegroups.com
#29231: Documentation Regression for Tutorial 03
-------------------------------+--------------------------------------
Reporter: Paul | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 2.0
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => invalid


Comment:

This suggestion is incorrect. You may be missing `app_name = 'polls'` in
`polls/urls.py`.

--
Ticket URL: <https://code.djangoproject.com/ticket/29231#comment:1>

Django

unread,
Mar 16, 2018, 6:24:32 PM3/16/18
to django-...@googlegroups.com
#29231: Documentation Regression for Tutorial 03
-------------------------------+--------------------------------------

Reporter: Paul | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 2.0
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Paul):

* status: closed => new
* resolution: invalid =>


Comment:

Here is my polls/url.py:
{{{
from django.urls import path

from . import views

app_name = 'polls'
urlpatterns = [
# /polls/
path('',views.index, name='index'),
# /polls/5/
path('<int:question_id>/', views.detail, name='detail'),
# /polls/5/results/
path('<int:question_id>/results/', views.results, name='results'),
# /polls/5/vote/
path('<int:question_id>/vote/', views.vote, name='vote'),
]
}}}

And python -m django --version yields 2.0.3

--
Ticket URL: <https://code.djangoproject.com/ticket/29231#comment:2>

Django

unread,
Mar 16, 2018, 6:26:51 PM3/16/18
to django-...@googlegroups.com
#29231: Documentation Regression for Tutorial 03
-------------------------------+--------------------------------------

Reporter: Paul | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 2.0
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Paul):

Running in virtualenv, pip list -l:
arrow (0.12.1)
blessed (1.14.2)
Django (2.0.3)
django-picklefield (1.0.0)
django-q (0.9.4)
pip (9.0.1)
python-dateutil (2.7.0)
pytz (2018.3)
setuptools (38.5.2)
six (1.11.0)
uWSGI (2.0.17)
wcwidth (0.1.7)
wheel (0.30.0)

--
Ticket URL: <https://code.djangoproject.com/ticket/29231#comment:3>

Django

unread,
Mar 16, 2018, 6:31:24 PM3/16/18
to django-...@googlegroups.com
#29231: Documentation Regression for Tutorial 03
-------------------------------+--------------------------------------

Reporter: Paul | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 2.0
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Paul):

I have created a repo: [[https://github.com/leftcoastbeard/djangotest]]

--
Ticket URL: <https://code.djangoproject.com/ticket/29231#comment:4>

Django

unread,
Mar 16, 2018, 6:36:59 PM3/16/18
to django-...@googlegroups.com
#29231: Documentation Regression for Tutorial 03
-------------------------------+--------------------------------------
Reporter: Paul | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 2.0
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Paul):

* status: new => closed
* resolution: => fixed


Comment:

Not sure what's going on, but it's working now following the existing
tutorial steps.

--
Ticket URL: <https://code.djangoproject.com/ticket/29231#comment:5>

Reply all
Reply to author
Forward
0 new messages