Skip to content

Commit 62579bd

Browse files
committed
layout manager -> layout handler
1 parent 0210f79 commit 62579bd

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/reactpy_django/pyscript/component_template.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
if TYPE_CHECKING:
55
import asyncio
66

7-
from reactpy_django.pyscript.layout_manager import ReactPyLayoutManager
7+
from reactpy_django.pyscript.layout_handler import ReactPyLayoutHandler
88

99

1010
# User component is inserted below by regex replacement
@@ -25,4 +25,4 @@ def root(): ...
2525

2626
# PyScript allows top-level await, which allows us to not throw errors on components
2727
# that terminate early (such as hook-less components)
28-
task_UUID = asyncio.create_task(ReactPyLayoutManager("UUID").run(user_workspace_UUID))
28+
task_UUID = asyncio.create_task(ReactPyLayoutHandler("UUID").run(user_workspace_UUID))

src/reactpy_django/pyscript/layout_manager.py renamed to src/reactpy_django/pyscript/layout_handler.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from reactpy.core.layout import Layout
88

99

10-
class ReactPyLayoutManager:
11-
"""Encapsulate the entire layout manager with a class to prevent overlapping
10+
class ReactPyLayoutHandler:
11+
"""Encapsulate the entire layout handler with a class to prevent overlapping
1212
variable names between user code.
1313
1414
This code is designed to be run directly by PyScript, and is not intended to be run

src/reactpy_django/templates/reactpy/pyscript_setup.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
<link rel="stylesheet" href="{% static 'reactpy_django/pyscript-hide-debug.css' %}" />
66
{% endif %}
77
<script type="module" async src="{% static 'reactpy_django/pyscript/core.js' %}"></script>
8-
<py-script async config='{{pyscript_config}}'>{{pyscript_layout_manager}}</py-script>
8+
<py-script async config='{{pyscript_config}}'>{{pyscript_layout_handler}}</py-script>

src/reactpy_django/templatetags/reactpy.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121
from reactpy_django.types import ComponentParams
2222
from reactpy_django.utils import (
23-
PYSCRIPT_LAYOUT_MANAGER,
23+
PYSCRIPT_LAYOUT_HANDLER,
2424
extend_pyscript_config,
2525
prerender_component,
2626
render_pyscript_template,
@@ -234,6 +234,6 @@ def pyscript_setup(
234234
print(reactpy_config.REACTPY_DEBUG_MODE)
235235
return {
236236
"pyscript_config": extend_pyscript_config(config, extra_packages),
237-
"pyscript_layout_manager": PYSCRIPT_LAYOUT_MANAGER,
237+
"pyscript_layout_handler": PYSCRIPT_LAYOUT_HANDLER,
238238
"reactpy_debug_mode": reactpy_config.REACTPY_DEBUG_MODE,
239239
}

src/reactpy_django/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
PYSCRIPT_COMPONENT_TEMPLATE = (
5858
Path(__file__).parent / "pyscript" / "component_template.py"
5959
).read_text(encoding="utf-8")
60-
PYSCRIPT_LAYOUT_MANAGER = (
61-
Path(__file__).parent / "pyscript" / "layout_manager.py"
60+
PYSCRIPT_LAYOUT_HANDLER = (
61+
Path(__file__).parent / "pyscript" / "layout_handler.py"
6262
).read_text(encoding="utf-8")
6363
PYSCRIPT_DEFAULT_CONFIG = {
6464
"packages": [

0 commit comments

Comments
 (0)