mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
Merge 02595eacf2
into 168710813c
This commit is contained in:
commit
f409eda3a4
|
@ -284,10 +284,10 @@ class DefaultRouter(SimpleRouter):
|
||||||
class APIRoot(views.APIView):
|
class APIRoot(views.APIView):
|
||||||
_ignore_model_permissions = True
|
_ignore_model_permissions = True
|
||||||
|
|
||||||
def get(self, request, format=None):
|
def get(self, request, *args, **kwargs):
|
||||||
ret = {}
|
ret = {}
|
||||||
for key, url_name in api_root_dict.items():
|
for key, url_name in api_root_dict.items():
|
||||||
ret[key] = reverse(url_name, request=request, format=format)
|
ret[key] = reverse(url_name, request=request, format=kwargs.get('format'))
|
||||||
return Response(ret)
|
return Response(ret)
|
||||||
|
|
||||||
return APIRoot.as_view()
|
return APIRoot.as_view()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user