title: AttributeError: module 'django.contrib.auth.views' has no attribute 'login'
body: <p>I got error on my django rest framework, I am running it on windows 10 OS. this is the entire error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "manage.py", line 15, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "c:\django\django\django\core\management\__init__.py", line 371, in execute_from_command_line
      utility.execute()
    File "c:\django\django\django\core\management\__init__.py", line 365, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "c:\django\django\django\core\management\base.py", line 288, in run_from_argv
      self.execute(*args, **cmd_options)
    File "c:\django\django\django\core\management\base.py", line 332, in execute
      self.check()
    File "c:\django\django\django\core\management\base.py", line 364, in check
      include_deployment_checks=include_deployment_checks,
    File "c:\django\django\django\core\management\commands\migrate.py", line 58, in _run_checks
      issues.extend(super()._run_checks(**kwargs))
    File "c:\django\django\django\core\management\base.py", line 351, in _run_checks
      return checks.run_checks(**kwargs)
    File "c:\django\django\django\core\checks\registry.py", line 73, in run_checks
      new_errors = check(app_configs=app_configs)
    File "c:\django\django\django\core\checks\urls.py", line 13, in check_url_config
      return check_resolver(resolver)
    File "c:\django\django\django\core\checks\urls.py", line 23, in check_resolver
      return check_method()
    File "c:\django\django\django\urls\resolvers.py", line 385, in check
      for pattern in self.url_patterns:
    File "c:\django\django\django\utils\functional.py", line 37, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "c:\django\django\django\urls\resolvers.py", line 524, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "c:\django\django\django\utils\functional.py", line 37, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "c:\django\django\django\urls\resolvers.py", line 517, in urlconf_module
      return import_module(self.urlconf_name)
    File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 994, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 971, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 955, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 665, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 678, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
    File "C:\django\travbudserver\travbudserver\urls.py", line 41, in &lt;module&gt;
      url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
    File "c:\django\django\django\urls\conf.py", line 34, in include
      urlconf_module = import_module(urlconf_module)
    File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 994, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 971, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 955, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 665, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 678, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
    File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\rest_framework\urls.py", line 24, in &lt;module&gt;
      url(r'^login/$', views.login, template_name, name='login'),
  AttributeError: module 'django.contrib.auth.views' has no attribute 'login'
  </code></pre>
  
  <p>This is my <code>url.py</code></p>
  
  <pre><code>from django.conf.urls import include, url
  from django.contrib import admin
  from django.urls import path
  from rest_framework import routers, serializers, viewsets
  from polls.models import Question, Choice
  
  # Serializers define the API representation.
  class QuestionSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = Question
          fields = ('question_text', 'pub_date')
  
  # ViewSets define the view behavior.
  class QuestionViewSet(viewsets.ModelViewSet):
      queryset = Question.objects.all()
      serializer_class = QuestionSerializer
  
  # Routers provide an easy way of automatically determining the URL conf.
  router = routers.DefaultRouter()
  router.register(r'question', QuestionViewSet)
  
  urlpatterns = [
      url(r'^', include(router.urls)),
      url(r'^polls/', include('polls.urls')),
      path('admin/', admin.site.urls),
      url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
  ]
  </code></pre>
  
  <p>does anyone have an idea about my situation? thanks in advance...</p>