Opened 6 years ago

Closed 6 years ago

#14344 closed (wontfix)

Duplicate view name does not raise an error

Reported by: Diederik van der Boor Owned by: nobody
Component: Core (Other) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When two views have the same name (by accident), Django does not detect or report this.

I think Django should raise an error, so the developer can easily find his mistake and correct it.

Change History (1)

comment:1 Changed 6 years ago by Alex Gaynor

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: wontfix
Status: newclosed

This is a little ambiguous: if you mean having 2 view functions with the same name it's not really possible for us to detect this, various static analysis tools (such a pyflakes) can help you here. If you mean having 2 URLs with the same name this is completely valid, and used by many people, so we certainly can't consider it an error. As such marking as wontfix, if you meant something *besides* these two, feel free to reopen.

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