#26276 closed New feature (duplicate)
GET parameter and fragment identifier for reverse and url template tag
Reported by: | Sven R. Kunze | Owned by: | nobody |
---|---|---|---|
Component: | Core (URLs) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | tzanke@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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
Change History (2)
comment:1 by , 9 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Version 0, edited 9 years ago by (next)
comment:2 by , 9 years ago
Cc: | added |
---|
Note:
See TracTickets
for help on using tickets.
Seems like a duplicate of #26276. The actual solution is still under discussion.