mirror of
https://github.com/django-components/django-components.git
synced 2025-11-17 05:48:37 +00:00
refactor: make it optional having to specify parent class of Args, Kwargs, Slots, etc
This commit is contained in:
parent
c66bd21231
commit
0255782ee2
31 changed files with 620 additions and 294 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Any, NamedTuple
|
||||
from typing import Any
|
||||
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ class CalendarNested(Component):
|
|||
js_file = "calendar.js"
|
||||
|
||||
# This component takes one parameter, a date string to show in the template
|
||||
class Kwargs(NamedTuple):
|
||||
class Kwargs:
|
||||
date: str
|
||||
|
||||
def get_template_data(self, args, kwargs: Kwargs, slots, context):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue