Advertisement
mwchase

Proposed template tag syntax

Oct 5th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.73 KB | None | 0 0
  1. {% tabulate 'example-table' of thing in things table_option='something' %}
  2.     {% cell column_option='something'%}
  3.         Heading 1
  4.         {% rowvalue %}
  5.             {{ thing.value }}
  6.     {% cell %}
  7.         Heading 2
  8.         {% rowvalue %}
  9.             {{ thing.other_value }}
  10. {% endtabulate %}
  11.  
  12. |
  13. V
  14.  
  15. <table id="example-table" data-table-option="something">
  16.     <thead>
  17.         <tr>
  18.             <th data-column-option="something">Heading 1</th>
  19.             <th>Heading 2</th>
  20.         </tr>
  21.     </thead>
  22.     <tbody>
  23.         {% for thing in things %}
  24.             <tr>
  25.                 <td>{{ thing.value }}</td>
  26.                 <td>{{ thing.other_value }}</td>
  27.             </tr>
  28.         {% endfor %}
  29.     </tbody>
  30. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement