Django Capturing multiple url parameters in request.GET
<p>i am trying to get all query parameters out of an request</p>

<pre><code>url/?animal__in=dog,cat&amp;countries__in=france
</code></pre>

<p>I tried</p>

<pre><code>animals = request.GET.get('animal__in','')
countries = request.GET.get('countries__in','')
</code></pre>

<p>but then animals and countries are not lists, they are just strings. Is there a more django way to do this whole capturing?</p>

<p>Edit:
Its important that i am using it in django-admin for filtering, where these two are not the same:</p>

<pre><code>url/?animal__in=dog,cat&amp;countries__in=france
url/?animal__in=dog&amp;animal__in=cat&amp;countries__in=france
</code></pre>

<p>Send the parameters in the proper HTTP format:</p>

<pre><code>?animal__in=dog&amp;animal__in=cat&amp;countries__in=france
</code></pre>

<p>and do </p>

<pre><code>request.GET.getlist('animal__in')
</code></pre>

python django django-admin django-urls