From 0ade256bc99628e196e5de3a8f2e79e9e6c43f8c Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 27 Mar 2022 11:18:46 -0500 Subject: [PATCH] Add new users list to index --- routes.py | 3 ++- templates/layouts/index.html | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/routes.py b/routes.py index 69ad0e4..d2caaec 100644 --- a/routes.py +++ b/routes.py @@ -8,7 +8,8 @@ blueprint = Blueprint('main', __name__) @blueprint.route('/') def index(): # put application's code here - return render_template('layouts/index.html') + users = User.query.order_by(User.time_registered).limit(10).all() + return render_template('layouts/index.html', new_users=users) @blueprint.route('/about') diff --git a/templates/layouts/index.html b/templates/layouts/index.html index c2b786b..1caff4d 100644 --- a/templates/layouts/index.html +++ b/templates/layouts/index.html @@ -1,5 +1,12 @@ {% extends 'layouts/base.html' %} {% block content %} -

New Users

+

New Users

+
+ +
{% endblock %}