djangorpc.utils.forms — Django RPC 0.1 documentation

### Navigation

- index
- modules |
- Django RPC 0.1 documentation »
- Module code »
- djangorpc »

# Source code for djangorpc.utils.forms

    from django.utils.encoding import force_unicode

    class AjaxForm(object):
        """
        Mixin for Django forms to return validation error in dictionary.
        """
        def get_errors(self):
            output = {}
            for key, value in self.errors.items():
                output[key] = '/n'.join([force_unicode(i) for i in value])
            return output

### Navigation

- index
- modules |
- Django RPC 0.1 documentation »
- Module code »
- djangorpc »