diff options
| author | Tom Christie | 2014-10-02 16:24:24 +0100 | 
|---|---|---|
| committer | Tom Christie | 2014-10-02 16:24:24 +0100 | 
| commit | df7b6fcf58417fd95e49655eb140b387899b1ceb (patch) | |
| tree | a4a7d932bb3ef7c8e326b0248662fd31edcc2658 /rest_framework/fields.py | |
| parent | ffc6aa3abcb0f823b43b63db1666913565e6f934 (diff) | |
| download | django-rest-framework-df7b6fcf58417fd95e49655eb140b387899b1ceb.tar.bz2 | |
First pass on incorperating the form rendering into the browsable API
Diffstat (limited to 'rest_framework/fields.py')
| -rw-r--r-- | rest_framework/fields.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/rest_framework/fields.py b/rest_framework/fields.py index f3ff2233..c794963e 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -689,10 +689,10 @@ class DateTimeField(Field):              return value          if self.format.lower() == ISO_8601: -            ret = value.isoformat() -            if ret.endswith('+00:00'): -                ret = ret[:-6] + 'Z' -            return ret +            value = value.isoformat() +            if value.endswith('+00:00'): +                value = value[:-6] + 'Z' +            return value          return value.strftime(self.format) | 
