pass multiple arguments in the url
<p>I'm trying to make a simple django app that interacts with the database. But I'm having trouble passing more than one parameter in the url.</p>

<p>To pass the arguments i do it this way:</p>

<pre><code>127.0.0.1:8000/REST/insert/?n=test/?x=2/?y=2/?z=True
</code></pre>

<p>And then in my <strong>views.py</strong> I get the parameters with:</p>

<pre><code>name = request.GET.get('n', '')
x = request.GET.get('x', '')
y = request.GET.get('y', '')
z = request.GET.get('z', '')
</code></pre>

<p>Clearly I'm doing it wrong. How can I fix it ?</p>

<p>The separators between query parameters should be <code>&amp;</code> characters instead of slashes and question marks (except the first).</p>

<pre><code>/?n=test/?x=2/?y=2/?z=True
</code></pre>

<p>should be</p>

<pre><code>/?n=test&amp;x=2&amp;y=2&amp;z=True
</code></pre>

<p>Note: I'm not actually sure you should be using query parameters here since your url has "insert" in it. If you're really trying to insert things into a database then this should at least be done through a post request as post data.</p>

python django django-urls