@@ -156,13 +156,11 @@ def django_js(static_path: str, key: Key | None = None):
156
156
157
157
def python_to_pyscript (
158
158
file_path : str ,
159
- extra_props : dict [str , Any ] | None = None ,
160
159
initial : str | VdomDict | ComponentType = "" ,
161
160
root : str = "root" ,
162
161
):
163
162
return _python_to_pyscript (
164
163
file_path ,
165
- extra_props = extra_props ,
166
164
initial = initial ,
167
165
root = root ,
168
166
)
@@ -308,15 +306,14 @@ def _cached_static_contents(static_path: str) -> str:
308
306
309
307
@component
310
308
def _python_to_pyscript (
311
- file_path : str ,
312
- extra_props : dict [str , Any ] | None = None ,
309
+ * file_paths : str ,
313
310
initial : str | VdomDict | ComponentType = "" ,
314
311
root : str = "root" ,
315
312
):
316
313
rendered , set_rendered = hooks .use_state (False )
317
314
uuid = uuid4 ().hex .replace ("-" , "" )
318
315
initial = vdom_or_component_to_string (initial , uuid = uuid )
319
- executor = render_pyscript_template (file_path , uuid , root )
316
+ executor = render_pyscript_template (file_paths , uuid , root )
320
317
321
318
if not rendered :
322
319
# FIXME: This is needed to properly re-render PyScript such as
@@ -325,10 +322,9 @@ def _python_to_pyscript(
325
322
set_rendered (True )
326
323
return None
327
324
328
- return html .div (
325
+ return html ._ (
329
326
html .div (
330
- (extra_props or {})
331
- | {"id" : f"pyscript-{ uuid } " , "className" : "pyscript" , "data-uuid" : uuid },
327
+ {"id" : f"pyscript-{ uuid } " , "className" : "pyscript" , "data-uuid" : uuid },
332
328
initial ,
333
329
),
334
330
pyscript ({"async" : "" }, executor ),
0 commit comments