1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Replaced some smart_xxx by force_xxx equivalent

smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
This commit is contained in:
Claude Paroz
2012-08-29 22:40:51 +02:00
parent 36df198e4b
commit ae88e73fa6
17 changed files with 56 additions and 56 deletions

View File

@@ -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_str
from django.utils.encoding import force_str
__all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryUploadedFile',
'SimpleUploadedFile')
@@ -30,7 +30,7 @@ class UploadedFile(File):
self.charset = charset
def __repr__(self):
return smart_str("<%s: %s (%s)>" % (
return force_str("<%s: %s (%s)>" % (
self.__class__.__name__, self.name, self.content_type))
def _get_name(self):