Limit packages on home page and sort by creation date descending
This commit is contained in:
parent
6012af6855
commit
149b43a013
|
@ -43,7 +43,7 @@ def send_upload(path):
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
@menu.register_menu(app, ".", "Home")
|
@menu.register_menu(app, ".", "Home")
|
||||||
def home_page():
|
def home_page():
|
||||||
packages = Package.query.filter_by(approved=True).all()
|
packages = Package.query.filter_by(approved=True).order_by(db.desc(Package.created_at)).limit(15).all()
|
||||||
return render_template("index.html", packages=packages)
|
return render_template("index.html", packages=packages)
|
||||||
|
|
||||||
from . import users, githublogin, packages, sass, tasks, admin, notifications
|
from . import users, githublogin, packages, sass, tasks, admin, notifications
|
||||||
|
|
Loading…
Reference in New Issue