mirror of
https://github.com/django-components/django-components.git
synced 2025-10-09 13:40:18 +00:00
parent
997ed52bb6
commit
dc9f1b46b2
10 changed files with 106 additions and 9 deletions
|
@ -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"
|
||||
|
|
|
@ -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"),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue