sort by last changed

This commit is contained in:
Leigh Morresi
2021-01-27 19:09:37 +01:00
parent b931f457fd
commit c73b9efe9e
2 changed files with 4 additions and 1 deletions

View File

@@ -80,6 +80,10 @@ def main_page():
# Show messages but once.
# maybe if the change happened more than a few days ago.. add a class
# Sort by last_changed
datastore.data['watching'].sort(key=lambda x: x['last_changed'], reverse=True)
output = render_template("watch-overview.html", watches=datastore.data['watching'], messages=messages)
messages = []
return output