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.reversemethod.
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 Mislav Cimperšak, 8 years ago

Summary: add request as optional argument to django.urls.base.urls.reverse in order to get fully qualified URLadd `request` as optional argument to `django.urls.base.urls.reverse` in order to get fully qualified URL

comment:2 by Mislav Cimperšak, 8 years ago

Has patch: set

added patch: PR

comment:3 by Josh Harwood, 8 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Tim Graham, 8 years ago

Summary: add `request` as optional argument to `django.urls.base.urls.reverse` in order to get fully qualified URLAllow reverse() to return a fully qualified URL

comment:5 by Tim Graham, 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 Mislav Cimperšak, 8 years ago

Resolution: wontfix
Status: assignedclosed

Closing the issue as discussed on google-groups.

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