aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/resources/views
diff options
context:
space:
mode:
authorGravatar fisher60 <[email protected]>2021-07-23 20:20:10 -0500
committerGravatar fisher60 <[email protected]>2021-07-23 20:20:10 -0500
commitc781ed1f80188ffb274eeada974172f4aa07c0b5 (patch)
tree8e4c3114f0095c2f608ce0da1c1dff5d6abc9e97 /pydis_site/apps/resources/views
parentAdd Kaggle's pandas tutorial. (diff)
change resources to prepare for smart resource search
Diffstat (limited to 'pydis_site/apps/resources/views')
-rw-r--r--pydis_site/apps/resources/views/__init__.py4
-rw-r--r--pydis_site/apps/resources/views/resources.py10
2 files changed, 9 insertions, 5 deletions
diff --git a/pydis_site/apps/resources/views/__init__.py b/pydis_site/apps/resources/views/__init__.py
index 8eb383b5..c89071c5 100644
--- a/pydis_site/apps/resources/views/__init__.py
+++ b/pydis_site/apps/resources/views/__init__.py
@@ -1,4 +1,4 @@
-from .resources import ResourcesView
+from .resources import resource_view
from .resources_list import ResourcesListView
-__all__ = ["ResourcesView", "ResourcesListView"]
+__all__ = ["resource_view", "ResourcesListView"]
diff --git a/pydis_site/apps/resources/views/resources.py b/pydis_site/apps/resources/views/resources.py
index 25ce3e50..dfd21682 100644
--- a/pydis_site/apps/resources/views/resources.py
+++ b/pydis_site/apps/resources/views/resources.py
@@ -1,7 +1,11 @@
from django.views.generic import TemplateView
+from django.shortcuts import render
+# class ResourcesView(TemplateView):
+# """View for resources index page."""
+#
+# template_name = "resources/resources.html"
-class ResourcesView(TemplateView):
- """View for resources index page."""
- template_name = "resources/resources.html"
+def resource_view(request):
+ return render(request, template_name="resources/resources.html")