title: Passing list as a parameter in url routing in Django
body: <p>I have a Business model in Django where I need to insert information from an API. However, I want to avoid the duplicates in the database. So, whenever user clicks on a specific link of business I need to check if it already exists on database and if not I have to insert it into the database and view the result. Following code is what I have done so far.</p>
  
  <pre><code>def checkBusiness(request, business):
      try:
          result = Business.objects.get(checkId=business.checkId)
  
      except Business.DoesNotExist:
          b = Business(name=business[0]['name'], street_address=business[0]['location']['address'], city=business[0]['location']['city'], state=business[0]['location']['state'], country=business[0]['location']['country'], category=business[0]['categories']['name'], distance=business[0]['location']['distance'], checkId=business[0]['id'])
          b.save()
          result = Business.objects.get(checkId=checkId)
  
      context = {
          'business': result,
      }
  
      return render(request, "MyDiary/checkBusiness.html", context)
  </code></pre>
  
  <p>Here is how my routing looks like:</p>
  
  <pre><code>path('checkBusiness', views.checkBusiness, name='checkBusiness'),
  </code></pre>
  
  <p>And this is my html:</p>
  
  <pre><code>       {% for business in businesses %}
               &lt;li&gt;
                      /*business is a json file for specific business detail*/
                      &lt;a href="{% url 'checkBusiness' business %}" &gt; {{ business.name }}, {{ business.location.address }}, {{ business.location.postalCode }} &lt;/a&gt;
               &lt;/li&gt;
          {% endfor %}
  
  </code></pre>