From 7be5961b0a37d761b9f1a56762afb3e58c8453de Mon Sep 17 00:00:00 2001 From: savingschampion Date: Thu, 19 Feb 2015 11:58:04 +0000 Subject: [PATCH] Allow Field to accept arbitrary kwargs This fixes an issue with arguments not expected when passing arguments from a Custom Paginator to the underlying object_serializer_class where the object_serializer_class is based upon ModelSerializer. --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index a5348922a..2d30de906 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -160,7 +160,7 @@ class Field(object): def __init__(self, read_only=False, write_only=False, required=None, default=empty, initial=empty, source=None, label=None, help_text=None, style=None, - error_messages=None, validators=None, allow_null=False): + error_messages=None, validators=None, allow_null=False, **kwargs): self._creation_counter = Field._creation_counter Field._creation_counter += 1