{% if messages %}
<ul class="messages">
{% for message in messages %}
<li {% if message.tags %} class="{{message.tags}}" {% endif %}>
<i class="bi bi-exclamation-triangle-fill"></i>
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
我想在 keycloak 页面上显示此消息。它的服务器现在与我们的 Django 项目不同,如何在 keyclock 页面上显示成功消息
视图返回成功和错误信息
response = requests.post(reset_url, data=payload, headers=headers)
if response.status_code == 200 and response.json()["statuscode"] == "E_SUCC":
messages.success(request,"You should receive an email with further instructions")
else:
messages.error(request,"Email not found.")