File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change
1
+ import six
1
2
import inflection
2
3
3
4
from django .conf import settings
@@ -26,7 +27,7 @@ def get_resource_name(view):
26
27
except AttributeError :
27
28
resource_name = view .__class__ .__name__
28
29
29
- if isinstance (resource_name , basestring ):
30
+ if isinstance (resource_name , six . string_types ):
30
31
return inflection .camelize (resource_name , False )
31
32
32
33
return resource_name
@@ -39,8 +40,8 @@ def format_keys(obj, format_type=None):
39
40
40
41
:format_type: Either 'camelize' or 'underscore'
41
42
"""
42
- if getattr (settings , 'REST_EMBER_FORMAT_KEYS' , False )\
43
- and format_type in ('camelize' , 'underscore' ):
43
+ if ( getattr (settings , 'REST_EMBER_FORMAT_KEYS' , False )
44
+ and format_type in ('camelize' , 'underscore' )) :
44
45
45
46
if isinstance (obj , dict ):
46
47
formatted = {}
You can’t perform that action at this time.
0 commit comments