You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}warning{% endif %}
{% if message.level == DEFAULT_MESSAGE_LEVELS.DEBUG %}info{% endif %}">
{{ message }}
</div>
</div>
</div>
{% endfor %}
{% endif %}
This means AJAX errors cannot be displayed the same way, as they do not interact with Python messages nor do they trigger a page refresh.
A very simple solution is to create a message container div which is empty by default. Create a javascript function to inject messages into the message container. In the template, loop through the messages and call the javascript function instead of injecting directly into the form.
For the time being, I guess I'll just make a javascript alert.
The text was updated successfully, but these errors were encountered:
Right now, messages are created in Python and served only on page refresh/reload by injection into a template:
karmaworld/karmaworld/templates/header.html
Lines 50 to 62 in a3ea073
This means AJAX errors cannot be displayed the same way, as they do not interact with Python messages nor do they trigger a page refresh.
A very simple solution is to create a message container div which is empty by default. Create a javascript function to inject messages into the message container. In the template, loop through the messages and call the javascript function instead of injecting directly into the form.
For the time being, I guess I'll just make a javascript alert.
The text was updated successfully, but these errors were encountered: