Ticket #8156: uploadfile_repr.diff
File uploadfile_repr.diff, 645 bytes (added by , 16 years ago) |
---|
-
django/core/files/uploadedfile.py
32 32 self.charset = charset 33 33 34 34 def __repr__(self): 35 return "<%s: %s (%s)>" % (self.__class__.__name__, self.name, self.content_type) 35 if type(self.name) is unicode: 36 name = repr(self.name) 37 else: 38 name = self.name 39 return "<%s: %s (%s)>" % (self.__class__.__name__, name, self.content_type) 36 40 37 41 def _get_name(self): 38 42 return self._name