django rest API route showing same api link for all end point
<p>I have created a small Task app &amp; define some end point like all task, Due Task, Completed Task.</p>

<p>Here is my url.py</p>

<pre><code>#Define API Routes
router = routers.DefaultRouter()
#router = routers.SimpleRouter()
router.register(r'task', views.TaskViewSet)
router.register(r'due_task', views.DueTaskViewSet)
router.register(r'completed_task', views.CompletedTaskViewSet)

urlpatterns = [
    # Examples:
    # url(r'^$', 'TaskAPI.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^',include(router.urls)),
    url(r'^admin/', include(admin.site.urls)),
]
</code></pre>

<p>Serializers.py </p>

<pre><code>class TaskSerializer(serializers.ModelSerializer):
    class Meta:
        model =  Task
        fields = ('id','task_name','task_desc','completed','date_created')
</code></pre>

<p>View.py</p>

<pre><code>class TaskViewSet(viewsets.ModelViewSet):

    queryset = Task.objects.all().order_by('-date_created')
    serializer_class = TaskSerializer

class DueTaskViewSet(viewsets.ModelViewSet):
    queryset = Task.objects.all().order_by('-date_created').filter(completed=False)
    serializer_class = TaskSerializer

class CompletedTaskViewSet(viewsets.ModelViewSet):
    queryset = Task.objects.all().order_by('-date_created').filter(completed=True)
    serializer_class = TaskSerializer
</code></pre>

<p>model.py</p>

<pre><code>class Task(models.Model):
    task_name = models.CharField(max_length=20)
    task_desc = models.TextField(max_length=200)
    completed = models.BooleanField(default=False)
    date_created = models.DateTimeField(auto_now=True)
</code></pre>

<p>when I run server &amp; hit 127.0.0.1:8080 API route windows will open with all endpoint pointing to the same link.</p>

<p><a href="https://i.stack.imgur.com/qKcUg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qKcUg.png" alt="enter image description here"></a></p>

<p>please suggest what is going wrong here.
Thanks</p>