Commit 061cc5a4 by Alasdair Nicol

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

parent 5833a184
...@@ -204,7 +204,7 @@ A validator may be any callable that raises a `serializers.ValidationError` on f ...@@ -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. 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): def __init__(self, base):
self.base = base self.base = base
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment