#26276: GET parameter and fragment identifier for reverse and url template tag
-----------------------------+--------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: new
Component: Core (URLs) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
Would you be interested in an addition to reverse and {% url %} which
provides the ability to add urlencoded GET parameters and fragment
identifier?
{{{
def reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None,
current_app=None, query=None, fragment=None):
base_url = django.reverse(viewname, urlconf, args, kwargs, prefix,
current_app)
query = '?' + urllib.urlencode(query) if query else ''
fragment = '#' + urllib.quote(fragment) if fragment else ''
return base_url + query + fragment
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26276>
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/050.dce2a8aabd0a81557650400fd47bd731%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.