2👍
✅
admin.site.urls
is not a view, it’s an URL configuration with an URL namespace of admin
. It’s a bit different because you shouldn’t use include()
, but in every other way it’s like including a different URLconf.
Since it is an include, the name
parameter has absolutely no effect.
To reverse the main page of the admin, use:
return Response({
'admin': reverse('admin:index', request=request, format=format),
})
A full list of admin URLs can be found in the docs.
👤knbk
Source:stackexchange.com