I'm trying to dynamically access GET parameters in Django template, but it's not working.
URL: ?id=1&name=John
I've tried something like this:
{% for r in request.GET %}
{% if request.GET.r %}
{{r}} = {{request.GET.r}}
{% endif %}
{% endfor %}
The problem is that even if the parameters are set, nothing is returned in the template.
It works though if I do request.GET.id or request.GET.name
Any ideas?