Ticket #2599: django_2599.diff

File django_2599.diff, 773 bytes (added by Christopher Lenz <cmlenz@…>, 18 years ago)

Quick and dirty fix for the problem

  • django/forms/__init__.py

     
    972972        except validators.ValidationError, e:
    973973            raise validators.CriticalValidationError, e.messages
    974974
     975    def render(self, data):
     976        # Make sure that the value will be a comma-separated string, not the
     977        # string representation of a Python list of strings
     978        if data is None:
     979            data = ''
     980        elif isinstance(data, list):
     981            data = ','.join(data)
     982        return TextField.render(self, data)
     983
    975984class RawIdAdminField(CommaSeparatedIntegerField):
    976985    def html2python(data):
    977986        return data.split(',')
Back to Top