Opened 7 years ago

Closed 7 years ago

#28631 closed Uncategorized (invalid)

admin.site.urls returns 3-tuple, not 2-tuple. — at Version 1

Reported by: Sjoerd Job Postmus Owned by: nobody
Component: contrib.admin Version: 2.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Sjoerd Job Postmus)

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.

Change History (1)

comment:1 by Sjoerd Job Postmus, 7 years ago

Description: modified (diff)
Resolution: invalid
Severity: Release blockerNormal
Status: newclosed
Type: BugUncategorized

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

Note: See TracTickets for help on using tickets.
Back to Top