Source

client_template_demo / template_demo / templates / home.mako

Diff from to

File template_demo/templates/home.mako

-hello world
+<%inherit file="layout.mako"/>
 
-<%def name="foob()">
-    foob
+${display_api(True)}
+
+<%def name="display_api(inline=False)">
+    <p>
+        API data - 
+        % if inline:
+            Displayed inline within a server-rendered page
+        % else:
+            Displayed via server-rendered ajax call
+        % endif
+    </p>
+    <table>
+        % for row in data:
+            <tr>
+                % for col in row:
+                    <td>${col}</td>
+                % endfor
+            </tr>
+        % endfor
+    </table>
 </%def>