Topic: dynamic modal give unexpected result
Ali Baltschun asked 5 years ago
foo.html:
{{ include "bar.html" with x="x1.html" y="y1"}}
{{ include "bar.html" with x="x2.html" y="y2"}}
{{ include "bar.html" y="y3"}}
bar.html:
### THIS IS WORKING
{% if x %}
y
x
{{include x}}
{% else %}
pass
{% endif %}
### THIS IS NOT WORKING
<div class="modal" ......>
...
{% if x %}
y
x
{{include x}}
{% else %}
pass
{% endif %}
...
</div>
Expected behavior
y1 x1 render x1.html
y2 x2 render x2.html
y3pass
Actual behavior
y1 x1 render x1.html
y2 x1 render x1.html <--- why this render x1 and not x2
y3 x1 render x1.html <--- still printing x and rendering x1.html
Resources (screenshots, code snippets etc.) stackover flow : https://stackoverflow.com/questions/60182272/django-include-from-with-var-unexpected-result
Mateusz Łubianka staff answered 5 years ago
Hi @Ali Baltschun,
I am sorry but at this moment our support for django is based solely on integration guidelines. Here can you find an article about integration: https://mdbootstrap.com/articles/jquery/how-to-integrate-mdbootstrap-with-django/
Best,
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.12.0
- Device: web
- Browser: chrome
- OS: ubuntu
- Provided sample code: No
- Provided link: Yes