I am building an API with the full gambit of CRUD operations, and want to use the regular Django-style urlconf lines instead of using a router. Currently, I have a chunk of code that looks like this:
router = routers.DefaultRouter()
router.register(r'media', media_views.MediaViewSet)
router.register(r'mediaservers', servers_views.MediaServersViewSet)
router.register(r'masterservers', servers_views.MasterServersViewSet)
And later on in the urls.py I have entries like these:
url(r'^apiroot/', router.get_api_root_view()),
url(r'^apiv1/(?P<pk>[a-b]+)/$', include(router.urls)),
(The 2nd line is under construction, so I know it doesn't work as-is yet)
My question is this: If I remove the router object and go 100% urlconf entries, how can I still have access to the APIRoot page? I use it quite a bit for debugging while working on the project. Is it bad form to have both a router object and urlconf entries (with regexes like above) in urls.py?
Is there any issue with using a router object just for the API Root view, even if it's just temporary during development?
