How to know which ad was clicked and send that data to a singles page
<p>I'm practicing with a flask website that is sort of a mock classifieds website. On a browse page, I am displaying all results for whatever a user searches for. How can I track which ad was clicked by the user so I can redirect them to a 'singles' page where it will show in greater detail the item they clicked on...?</p>

<p>My first instinct was to use sessions, but I just couldn't quite figure out the logic. I am rendering the data dynamically, where in the HTML template, data contains all the query results:</p>

<pre><code>&lt;ul class="list"&gt;

                    {% for row in data %}

                            &lt;a href="/iLike/"&gt;
                                &lt;li&gt;
                                    &lt;img src="{{ url_for('static', filename='images/logo.png') }}"
                                         title="" alt=""/&gt;
                                    &lt;section class="list-left"&gt;

                                        &lt;h5 class="title"&gt;{{ row[1] }}&lt;/h5&gt;

                                        &lt;p class="catpath"&gt;
                                            &lt;Strong&gt;Condition&lt;/strong&gt;: {{ row[3] }}&lt;/p&gt;
                                        &lt;p class="catpath"&gt;&lt;Strong&gt;details&lt;/strong&gt;: {{ row[2] }}&lt;/p&gt;
                                        &lt;p class="catpath"&gt;&lt;strong&gt;Looking for&lt;/strong&gt;: {{ row[5] }}&lt;/p&gt;
                                    &lt;/section&gt;

                                    &lt;section class="list-right"&gt;
                                        &lt;span class="date"&gt;{{ transType }}&lt;/span&gt;

                                    &lt;/section&gt;
                                    &lt;div class="clearfix"&gt;&lt;/div&gt;
                                &lt;/li&gt;
                            &lt;/a&gt;
</code></pre>

<p>Add some argument to link - ie <code>href="/iLike/?ad_number=1"</code> or <code>href="/iLike/1"</code> (second version needs argument in route/function)</p>

python flask e-commerce