title: Django template iterate over list inside request.GET
body: <p>My today's problem is that I've to preserve some url arguments that comes to my view in the request.</p>
  
  <p>Think about the following url:</p>
  
  <p><code>http://localhost:8000/some-url/?myargument=hello&amp;myargument=world&amp;myargument=whatever</code></p>
  
  <p>Noticed that every argument in my url has the same key ("myargument")? Keep that in mind</p>
  
  <p>In Django 1.6 if I do <code>{{ request.GET }}</code> in the template I get something like:</p>
  
  <p><code>&lt;QueryDict: {u'myargument': [u'hello', u'world', u'whatever']}&gt;</code></p>
  
  <p>To preserve the arguments in the next submit I want to iterate over the <code>request.GET</code> dictionary by creating a hidden field inside the <code>&lt;form&gt;</code> with the key-value pairs, I can do it with this code:</p>
  
  <pre><code>{% for key, value in request.GET.items %}
      &lt;input type="hidden" name="{{ key }}" value="{{ value }}"&gt;
  {% endfor %}
  </code></pre>
  
  <p>It works with single values, but not in my case because I've a list with the values of the key named "myargument".</p>
  
  <p>Obviously the first thing I tried was to iterate over the value by doing <code>{% for v in value %}</code> when the value is a list, but this only prints out the last item in the "value" list, in this case "whatever".</p>
  
  <p>Anyone had the same problem? How can I solve it? Thanks</p>