diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py index 28fb518..37474de 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -43,8 +43,10 @@ def send_upload(path): @app.route("/") @menu.register_menu(app, ".", "Home") def home_page(): - packages = Package.query.filter_by(approved=True).order_by(db.desc(Package.created_at)).limit(15).all() - return render_template("index.html", packages=packages) + query = Package.query.filter_by(approved=True) + count = query.count() + packages = query.order_by(db.desc(Package.created_at)).limit(15).all() + return render_template("index.html", packages=packages, count=count) from . import users, githublogin, packages, sass, tasks, admin, notifications |
