title: I am creating a Basic authentication in Django Rest Framework in Django 2.1 version.But it shows '.authenticate() must be overridden' error
body: <p><strong>Settings.py</strong></p>
  
  <blockquote>
    <p>REST_FRAMEWORK = {
        'DEFAULT_AUTHENTICATION_CLASSES':('rest_framework.authentication.BasicAuthentication',),
        'DEFAULT_PERMISSION_CLASSES':('rest_framework.permissions.IsAuthenticated',)
    }</p>
  </blockquote>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>from django.db import models
  class Emp(models.Model):
      eid = models.IntegerField()
      ename = models.CharField(max_length=30)
      sal = models.IntegerField()
      def __str__(self):
          return self.ename
  </code></pre>
  
  <p><strong>admin.py</strong></p>
  
  <blockquote>
  <pre><code>from django.contrib import admin
  from .models import Emp
  class AdminEmp(admin.ModelAdmin):
      list_display = ['eid','ename','sal']
  admin.site.register(Emp,AdminEmp)
  </code></pre>
  </blockquote>
  
  <p><strong>serializers.py</strong></p>
  
  <blockquote>
  <pre><code>from .models import Emp
  from rest_framework import serializers
  class EmpSerializer(serializers.ModelSerializer):
      class Meta:
          model = Emp
          fields = ('eid','ename','sal')
  </code></pre>
  </blockquote>
  
  <p><strong>views.py</strong></p>
  
  <blockquote>
  <pre><code>from .serializers import EmpSerializer
  from .models import Emp
  from rest_framework import viewsets
  from rest_framework.authentication import BaseAuthentication
  from rest_framework.permissions import IsAuthenticated
  class EmpViewSet2(viewsets.ModelViewSet):
      authentication_classes = (BaseAuthentication,)
      permission_classes = (IsAuthenticated,)
      queryset = Emp.objects.all()
      serializer_class = EmpSerializer
  </code></pre>
  </blockquote>
  
  <p><strong>app level urls.py</strong></p>
  
  <blockquote>
  <pre><code>from django.conf.urls import url,include
  from .views import EmpViewSet2
  from rest_framework.routers import DefaultRouter
  router = DefaultRouter()
  router.register('emp_viewset',EmpViewSet2,base_name='emp_viewset2')
  urlpatterns = [
  url(r'',include(router.urls)) ]
  </code></pre>
  </blockquote>
  
  <p><strong>Project level urls.py</strong></p>
  
  <blockquote>
  <pre><code>from django.contrib import admin
  from django.urls import path,include
  urlpatterns = [
      path('admin/', admin.site.urls),
      path('api/', include('Basic_Authentication_App.urls'))
  ]
  </code></pre>
  </blockquote>
  
  <p><strong>Username and password window</strong>
  <a href="https://i.stack.imgur.com/UaA2K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UaA2K.png" alt="enter image description here"></a></p>
  
  <p><strong>Django Rest Framework window</strong> <em>but when i click on this link</em>
  <em>"emp_viewset":"<a href="http://127.0.0.1:3499/api/emp_viewset/" rel="nofollow noreferrer">http://127.0.0.1:3499/api/emp_viewset/</a>"</em></p>
  
  <p><a href="https://i.stack.imgur.com/A21R8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A21R8.png" alt="enter image description here"></a></p>
  
  <p>it shows like below:
  <strong>NotImplementedError at /api/emp_viewset/</strong>
  <em>.authenticate() must be overridden.</em></p>
  
  <p><a href="https://i.stack.imgur.com/b6QPb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b6QPb.png" alt="enter image description here"></a></p>