#28631: admin.site.urls returns 3-tuple, not 2-tuple.
------------------------------------+--------------------------------------
     Reporter:  Sjoerd Job Postmus  |                    Owner:  nobody
         Type:  Uncategorized       |                   Status:  closed
    Component:  contrib.admin       |                  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:  0                   |                    UI/UX:  0
------------------------------------+--------------------------------------
Changes (by Sjoerd Job Postmus):

 * status:  new => closed
 * resolution:   => invalid
 * type:  Bug => Uncategorized
 * severity:  Release blocker => Normal


Old description:

> Returning a 3-tuple has been deprecated, and removed in
> https://github.com/django/django/commit/ad393beeb71e8774e4bf9ad842b97022e50f1231
> #diff-c479b67ee71bdbef4cc04b2663b8fce8 .
>
> However, looking at the definition of `admin.site.urls`:
> https://github.com/django/django/blob/master/django/contrib/admin/sites.py#L284
> , we see it returning a 3-tuple.
>
> ```
> ImproperlyConfigured at /
> Passing a 3-tuple to include() is not supported. Pass a 2-tuple
> containing the list of patterns and app_name, and provide the namespace
> argument to include() instead.
> ```

New description:

 Returning a 3-tuple has been deprecated, and removed in
 
https://github.com/django/django/commit/ad393beeb71e8774e4bf9ad842b97022e50f1231
 #diff-c479b67ee71bdbef4cc04b2663b8fce8 .

 However, looking at the definition of `admin.site.urls`:
 https://github.com/django/django/blob/master/django/contrib/admin/sites.py#L284
 , we see it returning a 3-tuple.

 {{{
 ImproperlyConfigured at /
 Passing a 3-tuple to include() is not supported. Pass a 2-tuple containing
 the list of patterns and app_name, and provide the namespace argument to
 include() instead.
 }}}

--

Comment:

 Figured out that one should be using `url(..., admin.site.urls)` instead
 of `url(..., include(admin.site.urls))`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28631#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/067.eab4f35eb6ed40736a2d5df7c49f9d4a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to