Ticket #17413: 17413.diff

File 17413.diff, 530 bytes (added by merb, 11 years ago)
  • django/forms/util.py

    diff --git a/django/forms/util.py b/django/forms/util.py
    index 3c77249..068738b 100644
    a b class ErrorDict(dict):  
    5151    def as_text(self):
    5252        return '\n'.join(['* %s\n%s' % (k, '\n'.join(['  * %s' % force_text(i) for i in v])) for k, v in self.items()])
    5353
     54    def as_dict(self):
     55        return dict(
     56            (k, map(unicode, v))
     57            for (k, v) in self.iteritems()
     58        )
     59
    5460@python_2_unicode_compatible
    5561class ErrorList(list):
    5662    """
Back to Top