Commits

Nikhil Chelliah committed 2cbc819

Comply with the latest version of restkit.

`Response.body` has been deprecated and removed in favor of `Response.body_string()`.

  • Participants
  • Parent commits 66c0208

Comments (0)

Files changed (2)

File django_roa/db/models.py

                 except RequestFailed, e:
                     raise ROAException(e)
             
-            response = force_unicode(response.body).encode(settings.DEFAULT_CHARSET)
+            response = force_unicode(response.body_string()).encode(settings.DEFAULT_CHARSET)
             
             for local_name, remote_name in ROA_MODEL_NAME_MAPPING:
                 response = response.replace(remote_name, local_name)

File django_roa/db/query.py

         except Exception, e:
             raise ROAException(e)
 
-        response = force_unicode(response.body).encode(settings.DEFAULT_CHARSET)
+        response = force_unicode(response.body_string()).encode(settings.DEFAULT_CHARSET)
         for local_name, remote_name in ROA_MODEL_NAME_MAPPING:
             response = response.replace(remote_name, local_name)
         
         except Exception, e:
             raise ROAException(e)
         
-        return int(response.body)
+        return int(response.body_string())
 
     def _get_from_id_or_pk(self, id=None, pk=None):
         """
         except Exception, e:
             raise ROAException(e)
         
-        response = force_unicode(response.body).encode(settings.DEFAULT_CHARSET)
+        response = force_unicode(response.body_string()).encode(settings.DEFAULT_CHARSET)
         for local_name, remote_name in ROA_MODEL_NAME_MAPPING:
             response = response.replace(remote_name, local_name)