I have a project with several applications. Each application has urls.py. I point to each of them from the urls.py project. However, all URLs are available, but they do not appear in DRF.
Here is the code:
from django.conf.urls import url, include
from rest_framework import routers
from employees.urls import employees_router
from access.urls import access_router
router = routers.DefaultRouter()
urlpatterns = [
url(r'^api/', include(employees_router.urls)),
url(r'^api/', include(access_router.urls)),
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]
Problem - ONLY the first display URL will display - in this case, employees. If I comment on this, then the access_router URLs display (users and groups) as separate links. Why are ALL URLs for rest_framework not showing at the same time - in list format?
source
share