Opened 8 years ago

Closed 8 years ago

Last modified 8 years 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 by Tim Graham, 8 years ago

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

comment:2 by Chris Lamb, 8 years ago

Has patch: set

PR

(No tests yet.)

comment:4 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 8d4885ed:

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

comment:5 by Tim Graham <timograham@…>, 8 years ago

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