diff options
Diffstat (limited to 'pydis_site/apps/timeline/views.py')
-rw-r--r-- | pydis_site/apps/timeline/views.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pydis_site/apps/timeline/views.py b/pydis_site/apps/timeline/views.py new file mode 100644 index 00000000..380dfe53 --- /dev/null +++ b/pydis_site/apps/timeline/views.py @@ -0,0 +1,20 @@ +from django.apps import apps +from django.core.handlers.wsgi import WSGIRequest +from django.http import HttpResponse +from django.shortcuts import render +from django.views import View + +APP_NAME = "timeline" + +class TimelineView(View): + """A vertical timeline showcasing milestones in the history of Python Discord.""" + + def get(self, request: WSGIRequest) -> HttpResponse: + """Render the timeline.""" + app = apps.get_app_config(APP_NAME) + + return render( + request, + template_name="timeline/timeline.html", + context={ "entries": app.entries }, + ) |