#5335: Add an append method to ErrorDict
-------------------------------------+-------------------------------------
     Reporter:  Thomas Güttler       |                    Owner:
  <hv@…>                             |  jkocherhans
         Type:  New feature          |                   Status:  new
    Component:  Forms                |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  append errodict      |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by alasdair):

 Looping through defaultdicts in templates can cause problems. See #16335.
 I believe this change will stop the following template snippet from
 working.

 {{{
     <ul>
       {% for field, errors in form.errors.items %}
        <li>{{ field }}: {{errors}}
       {% endford %}
     </ul>
 }}}

 I realise it's a slightly artificial example, and that usually you would
 use `{{ form.errors }}`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/5335#comment:29>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/089.f9950760824f449bf4d982da6b1111c0%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to