fix api overview
This commit is contained in:
parent
55013a61b6
commit
8ffa982882
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ class APIRoot(GenericAPIView):
|
|||
urls = OrderedDict()
|
||||
for urlpattern in router.urls:
|
||||
name = urlpattern.name
|
||||
url = self._format_pattern(urlpattern.regex.pattern).replace('{pk}', '{id}')
|
||||
url = self._format_pattern(str(urlpattern.pattern)).replace('{pk}', '{id}')
|
||||
base = url.split('/', 1)[0]
|
||||
if '-' in name:
|
||||
urls.setdefault(base, OrderedDict())[name.split('-', 1)[1]] = url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue