(May-26-2020, 11:43 AM)ndc85430 Wrote: Where is the handler that serves the template? Are you actually retrieving the data from the database and passing it to the template?
@home.route('/')
def homepage():
"""
Render the homepage template on the / route
"""
return render_template('home/dashboard.html', title="Welcome")
Yes I do
(May-26-2020, 12:52 PM)nuffink Wrote: As ndc85430 has said there is nothing in the code you have presented that shows the retrieval of the rows form your database only the code that shows the inserting of that data.
Once you have sorted the retrieval then the change the <td> tag in your dashboard htnl to add a href similar to this but not exactly this
<td><a href="{{ url_for('my_family_details_page') }}">{{ {{ family.name }} }}</a></td>
{% import "bootstrap/utils.html" as utils %} {% extends "base.html" %} {% block title %}Families{% endblock %} {% block body %} <div class="content-section"> <div class="outer"> <div class="middle"> <div class="inner"> <br/> {{ utils.flashed_messages() }} <br/> <h1 style="text-align:center;">Families</h1> <hr class="intro-divider"> <div class="center"> <table class="table table-striped table-bordered"> <tbody> {% for family in families %} <tr> <td> {{ family.name }} </td> </tr> {% endfor %} </tbody> </table> </div> <div style="text-align: center"> </div> </div> </div> </div> </div> {% endblock %}