kopia lustrzana https://github.com/dgtlmoon/changedetection.io
sort by last changed
rodzic
b931f457fd
commit
c73b9efe9e
|
@ -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
|
||||
|
|
|
@ -13,7 +13,6 @@ class ChangeDetectionStore:
|
|||
try:
|
||||
with open('/datastore/url-watches.json') as json_file:
|
||||
self.data = json.load(json_file)
|
||||
self.data['watching'].reverse()
|
||||
for p in self.data['watching']:
|
||||
print("Watching:", p['url'])
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue