{% extends "reactive_example_base.html" %} {% load reactive %} {% block title %}Basic Example{% endblock %} {% block content %}
Loading page, and no JavaScript errors so far...
{% with test_template_var="success" initial_first_float=1.5 initial_second_float=2.3 %} {% #block %} {% #block %} Test1 {% #/def text_dsadf=test_template_var %} {% #/def test_var = 'test' %} {% #/def test_array= ['str1', 'str2', 'str3'] %} {%#%} {%/%} Test2 {% #element span %} {% #/def nested_var ='nested' %} {% for element in example_list %} {{ element }} {% #/print test_var %} {% endfor %} {% #/print 'Test3' %} {% #/print nested_var %} {% /element %} {% #/def test_bool=True %} {% #element span %} {% #/print test_bool %} {% /element %} {% #element span %} {% #if test_bool %} Test4 {% #/print test_var %} {% /if %} {% /element %} {% if True %} {% #element span %} {% #/print test_array %} {% #for element in test_array %} {% #/def element2=2 %} {% #/def element3 =element %} {% #/print element2 %} {% #/print element3 %} {% /for %} {% /element %} {% endif %} {% comment %} Comment test {% endcomment %} {%#%} {%/%}{% #/print test_json %}
{% /element %} {%#%} {%/%} {% #/def people=[{first: 'John', last: 'Smith', age: 40},{first: 'Kristen', last: 'Perkins', age: 27}] %} {% #element section %} You may even render a table using an array of dictionary:First Name | Last Name | Age | {% #/print person.first %} | {% #/print person.last %} | {% #/print person.age %} | {% /element %} {% /for %}
---|
First Name | Last Name | Age | Notes | Actions | {%#%} {%/%} {% /element %} {% /for %} |
---|