mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
update landing with dynamic links and counter for Seeds
This commit is contained in:
@@ -4,7 +4,8 @@ from .models import *
|
||||
from datetime import timedelta
|
||||
|
||||
@app.route('/', methods=['GET', 'POST'])
|
||||
@cache.cached(timeout=300) # cache has to appear under app route for caching to work
|
||||
@cache.cached(timeout=300) # cache has to appear under app route for caching to work
|
||||
def landing():
|
||||
multiworlds = count(room for room in Room if room.creation_time >= datetime.utcnow() - timedelta(days=7))
|
||||
return render_template("landing.html", multiworlds=multiworlds)
|
||||
rooms = count(room for room in Room if room.creation_time >= datetime.utcnow() - timedelta(days=7))
|
||||
seeds = count(seed for seed in Seed if seed.creation_time >= datetime.utcnow() - timedelta(days=7))
|
||||
return render_template("landing.html", rooms=rooms, seeds=seeds)
|
||||
|
Reference in New Issue
Block a user