File tree Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -151,12 +151,12 @@ def Hello(greeting_recipient): # component names are camelcase by convention
151151## ` example_app/templates/your-template.html `
152152
153153In your templates, you may inject a view of an IDOM component into your templated HTML
154- by using the ` idom_view ` template tag. This tag which requires the name of a component
154+ by using the ` idom_component ` template tag. This tag which requires the name of a component
155155to render (of the form ` module_name.ComponentName ` ) and keyword arguments you'd like to
156156pass it from the template.
157157
158158``` python
159- idom_view module_name.ComponentName param_1= " something" param_2= " something-else"
159+ idom_component module_name.ComponentName param_1= " something" param_2= " something-else"
160160```
161161
162162In context this will look a bit like the following...
@@ -170,7 +170,7 @@ In context this will look a bit like the following...
170170<html>
171171 <body>
172172 ...
173- {% idom_view "your_app.example_app.components.Hello" greeting_recipient="World" %}
173+ {% idom_component "your_app.example_app.components.Hello" greeting_recipient="World" %}
174174 </body>
175175</html>
176176```
Original file line number Diff line number Diff line change 77 mountPoint ,
88 "{{ idom_websocket_url }}" ,
99 "{{ idom_web_modules_url }}" ,
10- "{{ idom_view_id }}" ,
11- "{{ idom_view_params }}"
10+ "{{ idom_component_id }}" ,
11+ "{{ idom_component_params }}"
1212 ) ;
1313</ script >
Original file line number Diff line number Diff line change 1717
1818
1919@register .inclusion_tag ("idom/view.html" )
20- def idom_view (_component_id_ , ** kwargs ):
20+ def idom_component (_component_id_ , ** kwargs ):
2121 _register_component (_component_id_ )
2222
2323 json_kwargs = json .dumps (kwargs , separators = ("," , ":" ))
@@ -26,8 +26,8 @@ def idom_view(_component_id_, **kwargs):
2626 "idom_websocket_url" : IDOM_WEBSOCKET_URL ,
2727 "idom_web_modules_url" : IDOM_WEB_MODULES_URL ,
2828 "idom_mount_uuid" : uuid4 ().hex ,
29- "idom_view_id " : _component_id_ ,
30- "idom_view_params " : urlencode ({"kwargs" : json_kwargs }),
29+ "idom_component_id " : _component_id_ ,
30+ "idom_component_params " : urlencode ({"kwargs" : json_kwargs }),
3131 }
3232
3333
Original file line number Diff line number Diff line change 1515
1616 < body >
1717 < h1 > IDOM Test Page</ h1 >
18- < div > {% idom_view "test_app.components.HelloWorld" %}</ div >
19- < div > {% idom_view "test_app.components.Button" %}</ div >
18+ < div > {% idom_component "test_app.components.HelloWorld" %}</ div >
19+ < div > {% idom_component "test_app.components.Button" %}</ div >
2020 < div >
21- {% idom_view "test_app.components.ParametrizedComponent" x=123 y=456 %}
21+ {% idom_component "test_app.components.ParametrizedComponent" x=123 y=456
22+ %}
2223 </ div >
23- < div > {% idom_view "test_app.components.SimpleBarChart" %}</ div >
24+ < div > {% idom_component "test_app.components.SimpleBarChart" %}</ div >
2425 </ body >
2526</ html >
You can’t perform that action at this time.
0 commit comments