#28720: Add HttpRequest.get_full_path_info
-----------------------------------------+------------------------
               Reporter:  Jonas Haag     |          Owner:  nobody
                   Type:  New feature    |         Status:  new
              Component:  HTTP handling  |        Version:  master
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  1
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 ``HttpRequest.get_full_path`` returns the ``HttpRequest.path`` based full
 path, including query string. Example: ``/posts/12345/?foo=bar``.

 We should add a counterpart for ``HttpRequest.path_info`` that includes
 the ``SCRIPT_NAME``, if set. Example: ``/scriptname/posts/12345/?foo=bar``

 Example use case: Adding hreflang meta tags to your ``<head>`` section.
 This must include the ``SCRIPT_NAME`` prefix as well, otherwise invalid
 URLs are given.

 {{{
 <link rel=alternative hreflang=en href="https://yourdomain.com{{
 request.get_full_path_info }}">
 }}}

 Patch: https://github.com/django/django/pull/9253

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28720>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.ef898006473736af645c69d0851c282b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to