Fix issue #368 and add tests (#369)

This commit is contained in:
Dylan Castillo 2024-01-27 23:10:03 +01:00 committed by GitHub
parent 997ed52bb6
commit dc9f1b46b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 106 additions and 9 deletions

View file

@ -14,6 +14,12 @@ class Calendar(component.Component):
"date": date,
}
def get(self, request, *args, **kwargs):
context = {
"date": request.GET.get("date", ""),
}
return self.render_to_response(context)
class Media:
css = "calendar/calendar.css"
js = "calendar/calendar.js"

View file

@ -1,6 +1,8 @@
from components.calendar.calendar import Calendar
from components.greeting import Greeting
from django.urls import path
from greeting import Greeting
urlpatterns = [
path("greeting/", Greeting.as_view(), name="greeting"),
path("calendar/", Calendar.as_view(), name="calendar"),
]