当我尝试从Jinja2模板中的wtforms写入错误时,它会返回未解码的引号。我该如何解决?
{% if registrationForm.errors %}
<script>swal("Error!", "{{ registrationForm.errors['password'] }}", "error")</script>
{% endif %}
错误等于
{'email': ['This field is required.'], 'username': ['This field is required.'], 'acceptTOS': ['This field is required.'], 'csrf_token': ['CSRF token missing'], 'password': ['This field is required.']}