title: How to fix this NoReverseMatch exception in Django rest frameworks routers?
body: <p>I'm working on this Django project for learning and I'm not able to resolve the URL using reverse().</p>
  
  <p>I have tried to understand this concept from online documentations and I'm not able to succeed with it.</p>
  
  <p>I'm using <code>ModelViewSet</code> in my views.py</p>
  
  <p>In my tests.py</p>
  
  <pre><code>POSTS_URL = reverse('posts:posts-list')
  </code></pre>
  
  <p>And this is my urls.py of posts(i.e., app)</p>
  
  <pre><code>app_name = 'posts'
  
  
  router = DefaultRouter()
  router.register('', PostsViewSet)
  
  
  urlpatterns = [
  path('', include(router.urls))
  ]
  </code></pre>
  
  <p>This is my urls.py in root</p>
  
  <pre><code>urlpatterns = [
  path('admin/', admin.site.urls),
  path('api/posts/', include('posts.urls')),
  path('docs/', include_docs_urls(title='My API title')),
  ]
  </code></pre>
  
  <p>And this is the error I'm getting</p>
  
  <pre><code>django.urls.exceptions.NoReverseMatch: Reverse for 'posts-list' not found. 'posts-list' is not a valid view function or patternname.
  </code></pre>
  
  <p>And also can someone suggest a good place to understand properly how reverse() and routers work together..</p>