MCPcopy Create free account
hub / github.com/encode/django-rest-framework / get_api_root_view

Method get_api_root_view

rest_framework/routers.py:364–373  ·  view source on GitHub ↗

Return a basic root view.

(self, api_urls=None)

Source from the content-addressed store, hash-verified

362 super().__init__(*args, **kwargs)
363
364 def get_api_root_view(self, api_urls=None):
365 """
366 Return a basic root view.
367 """
368 api_root_dict = {}
369 list_name = self.routes[0].name
370 for prefix, viewset, basename in self.registry:
371 api_root_dict[prefix] = list_name.format(basename=basename)
372
373 return self.APIRootView.as_view(api_root_dict=api_root_dict)
374
375 def get_urls(self):
376 """

Callers 2

get_urlsMethod · 0.95

Calls 1

as_viewMethod · 0.45

Tested by

no test coverage detected