Re: [Django] #35244: URL resolution does not work with a namespaced function reference.

5 views
Skip to first unread message

Django

unread,
Feb 22, 2024, 7:19:58 AM2/22/24
to django-...@googlegroups.com
#35244: URL resolution does not work with a namespaced function reference.
-------------------------------------+-------------------------------------
Reporter: Willem Van Onsem | Owner: nobody
Type: New feature | Status: closed
Component: Core (URLs) | Version: 5.0
Severity: Normal | Resolution: duplicate
Keywords: urls, resolve, | Triage Stage:
reverse, resolution | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Willem Van Onsem):

It is indeed discouraged, but the fact that `app_name` "breaks" it, is a
bit of an "admission of weakness". Indeed, there are Django apps that
could use reverse and plug in a view function reference. Now if one would
use such Django app, and then later include it in `urls.py` with an
`app_name`, the problems start occurring, so either it makes sense to
disable passing view function references at all, or these have to span
over the entire app.

The patch is just some fast prototyping, I think the main problem is
"proving" its soundness and completeness, which is of course difficult,
given the nice Christmas tree that building the reverse dictionary has
become :).
--
Ticket URL: <https://code.djangoproject.com/ticket/35244#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages