File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 77from datetime import date
88from django .http .response import HttpResponseRedirectBase , HttpResponse
99from django .template .response import TemplateResponse
10- from django .utils .encoding import force_text
10+ from django .utils .encoding import force_str
1111from django .db .models .base import ModelBase
1212from decimal import Decimal
1313
@@ -28,7 +28,7 @@ def default(self, obj):
2828 elif issubclass (type (obj ), HttpResponse ):
2929 return obj .content
3030 elif issubclass (type (obj ), Exception ) or isinstance (obj , bytes ):
31- return force_text (obj )
31+ return force_str (obj )
3232
3333 # this handles querysets and other iterable types
3434 try :
@@ -40,7 +40,7 @@ def default(self, obj):
4040
4141 # this handlers Models
4242 if isinstance (obj .__class__ , ModelBase ):
43- return force_text (obj )
43+ return force_str (obj )
4444
4545 if isinstance (obj , Decimal ):
4646 return float (obj )
You can’t perform that action at this time.
0 commit comments