Opened 8 years ago
Closed 8 years ago
#27440 closed New feature (wontfix)
Allow reverse() to return a fully qualified URL
Reported by: | Mislav Cimperšak | Owned by: | Mislav Cimperšak |
---|---|---|---|
Component: | Core (URLs) | Version: | 1.10 |
Severity: | Normal | Keywords: | reverse, request, full url |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
I'm adding an optional argument request
to django.urls.base.urls.reverse
method.
The idea is that using request
object one can get a fully qualified url.
The idea is taken from Django Rest Framework (link to it).
I'm in Amsterdam on the sprint and plan to do it here.
The patch and few tests are already written, just need to add docs.
Change History (6)
comment:1 by , 8 years ago
Summary: | add request as optional argument to django.urls.base.urls.reverse in order to get fully qualified URL → add `request` as optional argument to `django.urls.base.urls.reverse` in order to get fully qualified URL |
---|
comment:2 by , 8 years ago
Has patch: | set |
---|
comment:3 by , 8 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 8 years ago
Summary: | add `request` as optional argument to `django.urls.base.urls.reverse` in order to get fully qualified URL → Allow reverse() to return a fully qualified URL |
---|
comment:5 by , 8 years ago
Patch needs improvement: | set |
---|
There isn't consensus on the mailing list that passing request
to reverse()
is the best approach.
comment:6 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Closing the issue as discussed on google-groups.
Note:
See TracTickets
for help on using tickets.
added patch: PR