diff options
Diffstat (limited to 'pydis_site/apps/resources')
| -rw-r--r-- | pydis_site/apps/resources/tests/test_views.py | 1 | ||||
| -rw-r--r-- | pydis_site/apps/resources/views/resources.py | 5 | 
2 files changed, 4 insertions, 2 deletions
| diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py index f96a04b0..dab3599d 100644 --- a/pydis_site/apps/resources/tests/test_views.py +++ b/pydis_site/apps/resources/tests/test_views.py @@ -1,5 +1,4 @@  from pathlib import Path -from unittest.mock import patch  from django.conf import settings  from django.test import TestCase 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(), | 
