aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/views/articles.py
blob: ff945a19cfe44fdddf91192db308c730b58f7802 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.core.handlers.wsgi import WSGIRequest
from django.http import HttpResponse
from django.shortcuts import render
from django.views import View

from pydis_site.apps.content.utils import get_categories, get_articles


class ArticlesView(View):
    """Shows all content and categories."""

    def get(self, request: WSGIRequest) -> HttpResponse:
        """Shows all content and categories."""
        return render(request, "content/articles.html", {"content": get_articles(), "categories": get_categories()})