aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/views/pages.py
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2021-03-23 23:17:55 +0800
committerGravatar kosayoda <[email protected]>2021-03-23 23:17:55 +0800
commit82daedc766dc3986dc9ac17ea8a6b3da87a6b1ac (patch)
treef7f2cf5d08525bb5849676903772c61a79022e36 /pydis_site/apps/content/views/pages.py
parentRename `articles` to `pages`. (diff)
Simplify content app.
Rather than having two views for the base page and all other pages, all pages now use the same view. The view context handler is simplified to take advantage of pathlib features. The markdown folder is now /content/resources/* rather than /content/resources/content/*, as the latter is unnecessary nesting.
Diffstat (limited to 'pydis_site/apps/content/views/pages.py')
-rw-r--r--pydis_site/apps/content/views/pages.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/pydis_site/apps/content/views/pages.py b/pydis_site/apps/content/views/pages.py
deleted file mode 100644
index 11ac0eeb..00000000
--- a/pydis_site/apps/content/views/pages.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from django.views.generic import TemplateView
-
-from pydis_site.apps.content.utils import get_pages, get_categories
-
-
-class PagesView(TemplateView):
- """Shows all pages and categories."""
-
- template_name = "content/listing.html"
-
- def get_context_data(self, **kwargs) -> dict:
- """Add page and category data to template context."""
- context = super().get_context_data(**kwargs)
- context["content"] = get_pages()
- context["categories"] = get_categories()
- return context