Stuck making my table work please help me figure out this piece.
python code:
@app.route('/books')
def result():
dict={'Series Title': 'Batman Vol.1: The Count of the Owls', 'Writers': 'Scott Snyder', 'Pencilers': 'Greg Capullo', 'Inkers': 'Jonathan Glapion', 'Volume': 1, 'Issues Contained': 1-7, 'Publisher': 'DC'}
return render_template('books.html', result=dict)
html/flask code:
<table align="center" id="comic">
{% for key, value in result %}
<tr>
<th> {{ key }} </th>
<td> {{ value }} </td>
</tr>
{% endfor %}
</table>
Thanks for the help.
As clarified in the comments below, the particular error I have is “function not defined” for the function “result()”