mirror of
https://github.com/django-components/django-components.git
synced 2025-08-04 14:28:18 +00:00
feat: Component.args/kwargs/slots and {{ component_vars.args/kwargs/s… (#1205)
* feat: Component.args/kwargs/slots and {{ component_vars.args/kwargs/slots }} * docs: fix typo in changelog
This commit is contained in:
parent
d514694788
commit
e054a68715
14 changed files with 1262 additions and 217 deletions
|
@ -125,8 +125,8 @@ Thus, you can check where a slot was filled from by printing it out:
|
|||
|
||||
```python
|
||||
class MyComponent(Component):
|
||||
def on_render_before(self):
|
||||
print(self.input.slots)
|
||||
def on_render_before(self, *args, **kwargs):
|
||||
print(self.slots)
|
||||
```
|
||||
|
||||
might print:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue