Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#27874 closed Bug (fixed)

URL namespacing warning (urls.W005) does not consider nested URL namespaces

Reported by: Chris Lamb Owned by: nobody
Component: Core (System checks) Version: 1.11
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The URL namespacing warning (urls.W005) does not consider nested URL namespaces. For example, if your root namespace includes two different urlconfs via namespace="foo" and namespace="bar" but each of these urlconfs includes another distinct urlconf but with the same namespace argument (eg. namespace="baz"), then you get:

(urls.W005) URL namespace 'baz' isn't unique. You may not be able to reverse all URLs in this namespace

This doesn't seem right as "foo:baz:view-a" and "bar:baz:view-b" are entirely independent.

I am seeing this a bit as I typically separate the user and admin parts of an app using nested apps and simply use "admin" as the "baz" in the above examples to avoid DRY in the fully-qualified urls.

Change History (5)

comment:1 Changed 10 months ago by Tim Graham

Component: UncategorizedCore (System checks)
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:2 Changed 10 months ago by Chris Lamb

Has patch: set

PR

(No tests yet.)

comment:4 Changed 10 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 8d4885ed:

Fixed #27874 -- Fixed URL namespace warning (urls.W005) for nested namespaces.

comment:5 Changed 10 months ago by Tim Graham <timograham@…>

In 0417bf47:

[1.11.x] Fixed #27874 -- Fixed URL namespace warning (urls.W005) for nested namespaces.

Backport of 8d4885ede578b5beef7626cd31bbd19a95bd678a from master

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