from {% for key in form.errors.keys %}, key is the (k,v) for
form.errors dictionary.
key={{key}} shows what the key contains. In this case, it is something
like "__all__"
According to the dot notation, I should be able to use form.errors.key
to access the array of error messages associated since
you have to use the below code to print messages instead of keys
{% for key,message in form.errors %}
{{ message|striptags }}
{% endfor %}
On Jun 9, 11:21 am, Rama Vadakattu wrote:
> {% for message in form.errors.key %}
> {{message|striptags}}
> {% endfor %}
>
> The abov
{% for message in form.errors.key %}
{{message|striptags}}
{% endfor %}
The above will print keys instead of values as message is key not a
value.
On Jun 9, 11:06 am, Tom wrote:
> Hi all,
>
> Leveraging the default login view, I want to use my own login.html to
> show all th
Hi all,
Leveraging the default login view, I want to use my own login.html to
show all the errors in the login form:
{% if form.errors %}
Login Failed. Please try again.
{% for key in form.errors.keys %}
key={{key}},value=
{% for message in form.errors.key %}
{{message|
4 matches
Mail list logo