title: How to generate a separate django URL for each row in a table?
body: <p>I am using ajax to generate a table, each row of this table represents a trip with a trip score and multiple cities. I want to add a "AddtoFavourite" button to each trip, once the user clicks on this button a django view will be called which will add the trip to the userss "Favs". Now my question is How to generate this URL for each row where I can pass city, tripname and trip score in the request</p>
  
  <p>Here is the code which generates that table.</p>
  
  <p>Please note <code>datas</code> is the dict which contains list of trips, with each trip having a score and multiple cities in it.</p>
  
  <p>searchresults.html</p>
  
  <pre><code>{% for data in datas %}
  &lt;tr&gt;
      &lt;td&gt;{{ data.score}}&lt;/td&gt;
      {% for element in data.place.elements %}
      &lt;td&gt;
          &lt;img alt="" src="http://blankket-mk8te7kbzv.elasticbeanstalk.com/img/mapPinSmall.png"&gt;{{element.placeName}}
      &lt;/td&gt;
      {% endfor %}
      &lt;td&gt;
          &lt;input type="button" onlick=" " id="AddMyTrip" value="Add" class="btn btn-primary"/&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  {% endfor %}
  </code></pre>