mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
[py3] Made __repr__ return str with Python 3
This commit is contained in:
@@ -8,7 +8,7 @@ from io import BytesIO
|
||||
from django.conf import settings
|
||||
from django.core.files.base import File
|
||||
from django.core.files import temp as tempfile
|
||||
from django.utils.encoding import smart_bytes
|
||||
from django.utils.encoding import smart_str
|
||||
|
||||
__all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryUploadedFile',
|
||||
'SimpleUploadedFile')
|
||||
@@ -30,7 +30,7 @@ class UploadedFile(File):
|
||||
self.charset = charset
|
||||
|
||||
def __repr__(self):
|
||||
return smart_bytes("<%s: %s (%s)>" % (
|
||||
return smart_str("<%s: %s (%s)>" % (
|
||||
self.__class__.__name__, self.name, self.content_type))
|
||||
|
||||
def _get_name(self):
|
||||
|
||||
Reference in New Issue
Block a user