Sort URLs on index page alphabetical

This commit is contained in:
2022-12-10 22:00:06 +01:00
parent 0e9f7fd36d
commit 1de74f7d8a

View File

@ -200,6 +200,9 @@ def make_context_index(request) -> dict:
hook = reader.get_tag(feed.url, "webhook") hook = reader.get_tag(feed.url, "webhook")
feed_list.append({"feed": feed, "webhook": hook}) feed_list.append({"feed": feed, "webhook": hook})
# Sort feed_list by feed url
feed_list.sort(key=lambda x: x["feed"].url)
feed_count: FeedCounts = reader.get_feed_counts() feed_count: FeedCounts = reader.get_feed_counts()
entry_count: EntryCounts = reader.get_entry_counts() entry_count: EntryCounts = reader.get_entry_counts()
context: dict[str, Any] = { context: dict[str, Any] = {