Why reverse() and get_absolute_url() returns two different output and what
the purpose behind it ?
I have tested this code in Django 1.8 and 1.10, the same behavior
persists.
--
Ticket URL: <https://code.djangoproject.com/ticket/28118>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* type: Uncategorized => Bug
--
Ticket URL: <https://code.djangoproject.com/ticket/28118#comment:1>
* component: Uncategorized => contrib.flatpages
--
Ticket URL: <https://code.djangoproject.com/ticket/28118#comment:2>
* status: new => assigned
* owner: nobody => Michal
Comment:
Can you show me your urls.py file?
--
Ticket URL: <https://code.djangoproject.com/ticket/28118#comment:3>
* status: assigned => closed
* resolution: => needsinfo
Comment:
I am not sure why flatpages in get_absolute_url are not using "reverse" to
get full url address.
I could replace that, add tests - but I need some info if there is some
reason to leave it as is.
--
Ticket URL: <https://code.djangoproject.com/ticket/28118#comment:4>
* status: closed => new
* resolution: needsinfo =>
Comment:
Closing a ticket as "needsinfo" means the reporter hasn't provided enough
information (see
[https://docs.djangoproject.com/en/dev/internals/contributing/triaging-
tickets/#closing-tickets Closing Tickets]). Without some investigation,
I'm also not sure how to proceed here however closing the ticket because
of that isn't correct.
--
Ticket URL: <https://code.djangoproject.com/ticket/28118#comment:5>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28118#comment:6>
* status: new => closed
* resolution: => duplicate
Comment:
From what I can tell this is a duplicate of #22261 which was discussed a
few years ago. The resolution was that it seemed reasonable to change to
use {{{reverse}}} for {{{get_absolute_url}}}. A PR
https://github.com/django/django/pull/2554 was submitted but never updated
after an initial review. If you are looking to move this forward then
starting from that PR branch and updating it would be a good start.
--
Ticket URL: <https://code.djangoproject.com/ticket/28118#comment:7>