Flask retrieve element from for loop
تبليغيرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.
I have a music app project which I am working on that uses Flask and SQLalchemy to display search results when you search for a given song. At the moment, I am trying to create a “song page” if you will that displays details regarding the specific song selected. My flask for loop is as such:
{%for row in result%}
<li class=”product-result”>
<div class=”result”>
<h3 style=”width: 60%; font-size: 95%;” class=”result_title”>{{row.title}}</h3>
Similar to {{search}}</h4>
</div>
</li>
{%endfor%}
I want to store the row.title in some sort of session variable that can be passed to the song details page when the result is clicked. I am not sure the proper course of action to do this- hence the question. Any help would be greatly appreciated.
أضف إجابة