Ticket #13572: querydict-copy-encoding-fix.patch

File querydict-copy-encoding-fix.patch, 910 bytes (added by adammck, 14 years ago)
  • django/http/__init__.py

     
    177177        super(QueryDict, self).__delitem__(key)
    178178
    179179    def __copy__(self):
    180         result = self.__class__('', mutable=True)
     180        result = self.__class__('', mutable=True, encoding=self.encoding)
    181181        for key, value in dict.items(self):
    182182            dict.__setitem__(result, key, value)
    183183        return result
    184184
    185185    def __deepcopy__(self, memo):
    186186        import django.utils.copycompat as copy
    187         result = self.__class__('', mutable=True)
     187        result = self.__class__('', mutable=True, encoding=self.encoding)
    188188        memo[id(self)] = result
    189189        for key, value in dict.items(self):
    190190            dict.__setitem__(result, copy.deepcopy(key, memo), copy.deepcopy(value, memo))
Back to Top