blob: 380dfe536375c4f8b3013c6983ebbe8f6c20c078 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 },
)
|