Fixed #2900 -- Made example validator class in docs inherit from object

This commit is contained in:
Alasdair Nicol 2015-06-30 16:33:01 +01:00
parent 5833a1847f
commit 061cc5a42b

View File

@ -204,7 +204,7 @@ A validator may be any callable that raises a `serializers.ValidationError` on f
To write a class based validator, use the `__call__` method. Class based validators are useful as they allow you to parameterize and reuse behavior.
class MultipleOf:
class MultipleOf(object):
def __init__(self, base):
self.base = base