I want to create a custom or modified url using router for ModelViewSet.

Current scenario:

**/models.py** 

```
class BlogPost(models.Model):
    title = models.CharField(max_length=300)
    description = models.TextField()
    slug = models.SlugField(max_length=300, unique=True)

```

**/serializers.py**

```
class BlogListSerializer(serializers.ModelSerializer):
    class Meta:
        model = BlogPost
        exclude = ('id',)

```

**/views.py**

```
class BlogViewSet(ModelViewSet):
    queryset = BlogPost.objects.all()
    serializer_class = BlogListSerializer

```

**/urls.py**

```
router = DefaultRouter()
router.register(r'blog', BlogViewSet, basename='blog')
urlpatterns = router.urls

```

Now, I can access the url as below:

list <https://localhost:8000/blog>

retrieve <https://localhost:8000/blog/1>

As You can see that the retrieve url can be called using the pk or id. 
But I have created a model field called slug and its unique. My question is that how do I modify the retrieve url so that I can call the retrieve url using the slug field. For example: <https://localhost:8000/blog/test-slug>

Note: Why do I want to create a url using slug?
Answer: I want to use the urls for sitemap.