I'm new to Django and Django REST.
Trying to implement recommended routing scheme using nested router for each app.
Example:
mysite.url.py:
urlpatterns = [
url(r'^'+root_url+'/tinymce/', include('tinymce.urls')),
url(r'^'+root_url+'/admin/', admin.site.urls),
url(r'^'+root_url+'/swagger', swagger_schema_view),
url(r'^'+root_url+'/', include('blog.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
blog.urls.py:
from rest_framework import routers
from . import views
router = routers.DefaultRouter()
router.register(r'^/blog', views.PostViewSet)
router.register(r'^/users', views.UserViewSet)
getting exception:
django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'blog.urls' from 'C:\\Users\\user11\\PycharmProjects\\api_v2\\blog\\urls.py'>' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import.