Fix Jinja2 template support for nested variables
This commit is contained in:
@@ -4,13 +4,13 @@
|
|||||||
"recordsTotal": {{total}},
|
"recordsTotal": {{total}},
|
||||||
"recordsFiltered": {{total_filtered}},
|
"recordsFiltered": {{total_filtered}},
|
||||||
"data": [
|
"data": [
|
||||||
|
{%- set report_flag = false -%}
|
||||||
{% for report in reports -%}
|
{% for report in reports -%}
|
||||||
{%- if report_flag %},{%- endif %}
|
{%- if not loop.first %},{%- endif -%}
|
||||||
{%- set report_flag = True -%}
|
|
||||||
[
|
[
|
||||||
|
{%- set column_flag = false -%}
|
||||||
{%- for column in columns -%}
|
{%- for column in columns -%}
|
||||||
{%- if column_flag %},{%- endif -%}
|
{%- if not loop.first %},{%- endif -%}
|
||||||
{%- set column_flag = True -%}
|
|
||||||
{%- if column.type == 'datetime' -%}
|
{%- if column.type == 'datetime' -%}
|
||||||
"<span rel=\"utctimestamp\">{{ report[column.attr] }}</span>"
|
"<span rel=\"utctimestamp\">{{ report[column.attr] }}</span>"
|
||||||
{%- elif column.type == 'status' -%}
|
{%- elif column.type == 'status' -%}
|
||||||
|
|||||||
Reference in New Issue
Block a user