lnbits-legend/lnbits/templates/macros.jinja
2020-03-07 22:27:00 +01:00

12 lines
306 B
Django/Jinja

{% macro window_vars(user, wallet) -%}
<script>
window.extensions = {{ EXTENSIONS | tojson | safe }};
{% if user %}
window.user = {{ user | tojson | safe }};
{% endif %}
{% if wallet %}
window.wallet = {{ wallet | tojson | safe }};
{% endif %}
</script>
{%- endmacro %}