mirror of
https://github.com/django-components/django-components.git
synced 2025-11-19 14:26:46 +00:00
refactor: make it optional having to specify parent class of Args, Kwargs, Slots, etc (#1466)
This commit is contained in:
parent
0aeb96fa40
commit
c37628dea0
34 changed files with 661 additions and 299 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