mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-14 05:36:50 +03:00
Don’t rely on Django’s get as it breaks for 1.7
This commit is contained in:
parent
6aadd1639b
commit
da89cfc937
|
@ -71,6 +71,10 @@ class APIRequestFactory(DjangoRequestFactory):
|
||||||
|
|
||||||
return ret, content_type
|
return ret, content_type
|
||||||
|
|
||||||
|
def get(self, path, data=None, format=None, content_type=None, **extra):
|
||||||
|
data, content_type = self._encode_data(data, format, content_type)
|
||||||
|
return self.generic('GET', path, data, content_type, **extra)
|
||||||
|
|
||||||
def post(self, path, data=None, format=None, content_type=None, **extra):
|
def post(self, path, data=None, format=None, content_type=None, **extra):
|
||||||
data, content_type = self._encode_data(data, format, content_type)
|
data, content_type = self._encode_data(data, format, content_type)
|
||||||
return self.generic('POST', path, data, content_type, **extra)
|
return self.generic('POST', path, data, content_type, **extra)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user