diff options
| author | Tom Christie | 2012-10-01 07:56:19 -0700 |
|---|---|---|
| committer | Tom Christie | 2012-10-01 07:56:19 -0700 |
| commit | 1d432cf4327d5c4cdee323310cc80c5f111f0a23 (patch) | |
| tree | d45a059c40ee2be8c77f6da0c7092a1a57a00ad1 /rest_framework/fields.py | |
| parent | 1ace8d6eeadab63377166e8183f7263c065b7882 (diff) | |
| parent | b16fb5777168246b1e217640b818a82eb6e2141b (diff) | |
| download | django-rest-framework-1d432cf4327d5c4cdee323310cc80c5f111f0a23.tar.bz2 | |
Merge pull request #274 from tomchristie/pagination
Expand pagination support, add docs
Diffstat (limited to 'rest_framework/fields.py')
| -rw-r--r-- | rest_framework/fields.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 74675ee9..e1a551d3 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -158,6 +158,8 @@ class Field(object): return value elif hasattr(self, 'model_field'): return self.model_field.value_to_string(self.obj) + elif hasattr(value, '__iter__') and not isinstance(value, (dict, basestring)): + return [self.to_native(item) for item in value] return smart_unicode(value) def attributes(self): |
