I want to show the results of the variable "date" in an iframe called "final.html", when I execute the code in the iframe it goes into a loop that results in an error.
views.py
def notification_html(request):
data = _notification(request, url)
render(request, 'notification_result.html', {'notifications': data})
return render(request,'final.html')
notification_result.html
<body>
{% if notifications %}
<ul>
{% for n in notifications %}
<li style="background-color:{{ n.notification_type.color }}"><b>{{ n.title }}</b> - {{ n.description }} </li>
{% endfor %}
</ul>
{% else %}
<p>No notifications.</p>
{% endif %}
</body>
final.html
<body>
<iframe width="100%" height=auto style="border: none" src="notification_result.html" name="iframe_notification"></iframe>
Hi and welcome this page contains the iframe
</body>
The code works perfectly without the iframe