diff options
| author | Tom Christie | 2014-05-22 17:26:37 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-05-22 17:26:37 +0100 |
| commit | 01e2a342101dc66f5d69916c99bf2a78682fdb82 (patch) | |
| tree | 2f69e141fc0e8e195d08e5600ca08cbc531f8db4 | |
| parent | 218b94e60696de649407f9292359e02e5daa787d (diff) | |
| parent | 04c820b8e5e4ae153eacd1cbf19b39286c374e87 (diff) | |
| download | django-rest-framework-01e2a342101dc66f5d69916c99bf2a78682fdb82.tar.bz2 | |
Merge pull request #1594 from jcsp/wip-methodfield
fields: allow help_text on SerializerMethodField
| -rw-r--r-- | rest_framework/fields.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 2da89550..4ac5285e 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -1027,9 +1027,9 @@ class SerializerMethodField(Field): A field that gets its value by calling a method on the serializer it's attached to. """ - def __init__(self, method_name): + def __init__(self, method_name, *args, **kwargs): self.method_name = method_name - super(SerializerMethodField, self).__init__() + super(SerializerMethodField, self).__init__(*args, **kwargs) def field_to_native(self, obj, field_name): value = getattr(self.parent, self.method_name)(obj) |
