[Django] #31547: A bug in Django3.0.6 about the function of "include"

25 views
Skip to first unread message

Django

unread,
May 7, 2020, 6:09:16 AM5/7/20
to django-...@googlegroups.com
#31547: A bug in Django3.0.6 about the function of "include"
-------------------------------------------+------------------------
Reporter: Xiang Li | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
I want to add a URL by the function of "include"(function define in file
"Django/urls/conf.py"), when I add a parameter "app_name", it said that
"Unexpected argument ", I enter to the conf.py and find the reason:
"app_name" not is a parameter, and find it at first line, I think that's
the mistake. I put it in parentheses and it run successfully.

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

Django

unread,
May 7, 2020, 6:31:45 AM5/7/20
to django-...@googlegroups.com
#31547: A bug in Django3.0.6 about the function of "include"
---------------------------------+--------------------------------------

Reporter: Xiang Li | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: master
Severity: Release blocker | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | 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:

This is the expected behavior.

See [https://docs.djangoproject.com/en/3.0/ref/urls/#include the include
docs]. It provided 3 calling patterns. Where you pass the `app_namespace`
(`app_name` in your case) the first parameter is a tuple.

If you use the first pattern `include(module)`, `app_name` will be pulled
from the included module,
[https://docs.djangoproject.com/en/3.0/topics/http/urls/#url-namespaces-
and-included-urlconfs as described here].

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

Django

unread,
May 7, 2020, 6:32:12 AM5/7/20
to django-...@googlegroups.com
#31547: A bug in Django3.0.6 about the function of "include".
-------------------------------+--------------------------------------

Reporter: Xiang Li | Owner: nobody
Type: Uncategorized | Status: closed
Component: Core (URLs) | Version: master
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by felixxm):

* resolution: invalid => duplicate
* has_patch: 1 => 0
* component: Uncategorized => Core (URLs)
* severity: Release blocker => Normal


Comment:

Duplicate of #31545. I will respond in the original ticket.

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

Reply all
Reply to author
Forward
0 new messages