diff options
author | 2022-01-29 14:55:01 +0100 | |
---|---|---|
committer | 2022-01-29 14:55:01 +0100 | |
commit | 325d7076ee7b426e50fdf513caed07536bfdb9b5 (patch) | |
tree | ac4aebe99bba142c0892e3fbcc1b52cb645e6948 /pydis_site/apps/resources/views/resources.py | |
parent | Complexity -> Difficulty. (diff) |
Sort all the resources alphabetically.
Diffstat (limited to 'pydis_site/apps/resources/views/resources.py')
-rw-r--r-- | pydis_site/apps/resources/views/resources.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py index 14b3d0bf..d0b8bae7 100644 --- a/pydis_site/apps/resources/views/resources.py +++ b/pydis_site/apps/resources/views/resources.py @@ -2,7 +2,7 @@ from pathlib import Path import yaml from django.core.handlers.wsgi import WSGIRequest -from django.http import HttpRequest, HttpResponse +from django.http import HttpResponse from django.shortcuts import render from django.views import View @@ -24,6 +24,9 @@ class ResourceView(View): for path in RESOURCES_PATH.rglob("*.yaml") } + # Sort the resources alphabetically + self.resources = dict(sorted(self.resources.items())) + # Parse out all current tags resource_tags = { "topics": set(), |