@@ -72,7 +72,7 @@ def __init__(self, verbose_name=None, accessor=None, default=None,
72
72
if not (accessor is None or isinstance (accessor , basestring ) or
73
73
callable (accessor )):
74
74
raise TypeError ('accessor must be a string or callable, not %s' %
75
- accessor . __class__ .__name__ )
75
+ type ( accessor ) .__name__ )
76
76
if callable (accessor ) and default is not None :
77
77
raise TypeError ('accessor must be string when default is used, not callable' )
78
78
self .accessor = A (accessor ) if accessor else None
@@ -89,7 +89,7 @@ def __init__(self, verbose_name=None, accessor=None, default=None,
89
89
attrs = attrs or {}
90
90
if not isinstance (attrs , Attrs ):
91
91
warnings .warn ('attrs must be Attrs object, not %s'
92
- % attrs . __class__ .__name__ , DeprecationWarning )
92
+ % type ( attrs ) .__name__ , DeprecationWarning )
93
93
attrs = Attrs (attrs )
94
94
self .attrs = attrs
95
95
# massage order_by into an OrderByTuple or None
@@ -193,7 +193,7 @@ def __init__(self, attrs=None, **extra):
193
193
attrs = attrs or Attrs ()
194
194
if not isinstance (attrs , Attrs ):
195
195
warnings .warn ('attrs must be Attrs object, not %s'
196
- % attrs . __class__ .__name__ , DeprecationWarning )
196
+ % type ( attrs ) .__name__ , DeprecationWarning )
197
197
attrs = Attrs (td__input = attrs )
198
198
# This is done for backwards compatible too, there used to be a
199
199
# ``header_attrs`` argument, but this has been deprecated. We'll
@@ -281,7 +281,7 @@ def __init__(self, viewname, urlconf=None, args=None, kwargs=None,
281
281
attrs = attrs or Attrs ()
282
282
if not isinstance (attrs , Attrs ):
283
283
warnings .warn ('attrs must be Attrs object, not %s'
284
- % attrs . __class__ .__name__ , DeprecationWarning )
284
+ % type ( attrs ) .__name__ , DeprecationWarning )
285
285
attrs = Attrs (a = attrs )
286
286
extra ['attrs' ] = attrs
287
287
super (LinkColumn , self ).__init__ (** extra )
@@ -791,4 +791,4 @@ def __getitem__(self, index):
791
791
"choices are: %s" % (index , self .names ()))
792
792
else :
793
793
raise TypeError (u'row indices must be integers or str, not %s'
794
- % index . __class__ .__name__ )
794
+ % type ( index ) .__name__ )
0 commit comments