I'm generating a table. I want the cells to be different depending on the type of the content. How do I test for the type of the content? I'd like to do something like this.
      <tbody>
      {% for row in rows %}
        <tr>
          {% for cell in row %}
            <td>
                {% if isinstance( {{ cell }}, list) %}
                  <ul>
                  {% for element in cell %}
                    <li>{{Â
element  }}</li>
                  {% endfor %}
                  <ul>
                {% else %}
                  {{ cell }}
                {% endif %}
            </td>
          {% endfor %}
        </tr>
      {% endfor %}
      </tbody>
But "{% if isinstance( {{ cell }}, list) %}" is not allowed. Apparently I can't call a function in an {% if ... Â %} tag. Â Is there another way to do this?
Thanks.