title: Django Rest Framework: incorrect hyperlink on second viewset of same model
body: <p>I'm trying to provide two distinct APIs using DRF but I'm unable to get the second app to stop creating 
  hyperlinked references based on the first. It's essentially the same problem as <a href="https://stackoverflow.com/questions/40758373/django-rest-framework-with-multiple-viewsets-and-routers-for-the-same-object/">Django Rest Framework with multiple Viewsets and Routers for the same object</a> but I'm unable to get it working.</p>
  
  <p><code>app1/urls.py</code>:</p>
  
  <pre><code>router = SimpleRouter(trailing_slash=False)
  router.register(prefix=r'article', viewset=app1.ArticleViewSet, basename=r'article')
  urlpatterns = [path(f'', include(router.urls)]
  </code></pre>
  
  <p><code>app2/urls.py</code>:</p>
  
  <pre><code>router = SimpleRouter(trailing_slash=False)
  router.register(prefix=r'published', viewset=app2.ArticleViewSet, basename=r'published')
  urlpatterns = [path(f'', include(router.urls)]
  </code></pre>
  
  <p><code>site/urls.py</code>:</p>
  
  <pre><code>urlpatterns = [
      path('app1/', include('app1.urls')),
      path('app2/', include('app2.urls')),
  ]
  </code></pre>
  
  <p>While both viewsets are of the same model, the queryset &amp; serializer for each is different.</p>
  
  <p>When I GET an item from <code>/app2/published</code>, it has an <code>app1</code> URL:</p>
  
  <pre><code>"url": "http://localhost:8000/app1/article/5461"
  </code></pre>
  
  <p>What I'm wanting is for items retrieved via <code>app2</code> to have:</p>
  
  <pre><code>"url": "http://localhost:8000/app2/published/5461"
  </code></pre>
  
  <p>From looking at the docs, it appears that providing <code>basename</code> should do what I want, but I'm not having any luck with getting it to work.</p>