title: I am creating a TodoApp using Django3.2 and React js and I got the error: cannot import views
body: <p>I am creating a Todo App using Django 3.2 with python 3.6.8 and react js.</p>
  <p>I have installed the djangorestframework and Django-cors-headers. However, I cannot get the App views. I could not do the migration as well.</p>
  <p>I got the following error when I try to run the server:</p>
  <pre><code>Watching for file changes with StatReloader
  Performing system checks...
  
  Exception in thread django-main-thread:
  Traceback (most recent call last):
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\threading.py&quot;, line 916, in _bootstrap_inner
      self.run()
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\threading.py&quot;, line 864, in run
      self._target(*self._args, **self._kwargs)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\autoreload.py&quot;, line 64, in wrapper
      fn(*args, **kwargs)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\runserver.py&quot;, line 118, in inner_run
      self.check(display_num_errors=True)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py&quot;, line 423, in check
      databases=databases,
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\registry.py&quot;, line 76, in run_checks
      new_errors = check(app_configs=app_configs, databases=databases)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py&quot;, line 13, in check_url_config
      return check_resolver(resolver)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py&quot;, line 23, in check_resolver
      return check_method()
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py&quot;, line 412, in check
      for pattern in self.url_patterns:
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py&quot;, line 598, in url_patterns
      patterns = getattr(self.urlconf_module, &quot;urlpatterns&quot;, self.urlconf_module)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py&quot;, line 591, in urlconf_module
      return import_module(self.urlconf_name)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py&quot;, line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 994, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 971, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 955, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 665, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 678, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;C:\Users\User\Desktop\mydjango\mydjango\urls.py&quot;, line 22, in &lt;module&gt;
      path('todoappApi/', include('todoappApi.urls')),
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\conf.py&quot;, line 34, in include
      urlconf_module = import_module(urlconf_module)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py&quot;, line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 994, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 971, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 665, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 678, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;C:\Users\User\Desktop\mydjango\todoappApi\urls.py&quot;, line 2, in &lt;module&gt;
      from . import views
    File &quot;C:\Users\User\Desktop\mydjango\todoappApi\views.py&quot;, line 4, in &lt;module&gt;
      from rest_framework.decorators import todoappApi_view
  ImportError: cannot import name 'todoappApi_view'
  </code></pre>
  <p>Here is my views:</p>
  <pre><code>from django.shortcuts import render
  from django.http import JsonResponse
  
  from rest_framework.decorators import todoappApi_view
  from rest_framework.response import Response
  from .serializers import TaskSerializer
  
  from .models import Task
  # Create your views here.
  #The function todoappApiOverview will allow React js to get responses from the API
  @todoappApi_view(['GET'])
  def todoappApiOverview(request):
      todoappApi_urls = {
          'List':'/task-list/',
          'Detail View':'/task-detail/&lt;str:pk&gt;/',
          'Create':'/task-create/',
          'Update':'/task-update/&lt;str:pk&gt;/',
          'Delete':'/task-delete/&lt;str:pk&gt;/',
          }
  
      return Response(todoappApi_urls)
  
  #React js will get the data responses using the taskListfollowing functions
  @todoappApi_view(['GET'])
  def taskList(request):
      tasks = Task.objects.all().order_by('-id')
      serializer = TaskSerializer(tasks, many=True)
      return Response(serializer.data)
  
  @todoappApi_view(['GET'])
  def taskDetail(request, pk):
      tasks = Task.objects.get(id=pk)
      serializer = TaskSerializer(tasks, many=False)
      return Response(serializer.data)
  
  
  @todoappApi_view(['POST'])
  def taskCreate(request):
      serializer = TaskSerializer(data=request.data)
  
      if serializer.is_valid():
          serializer.save()
  
      return Response(serializer.data)
  
  @todoappApi_view(['POST'])
  def taskUpdate(request, pk):
      task = Task.objects.get(id=pk)
      serializer = TaskSerializer(instance=task, data=request.data)
  
      if serializer.is_valid():
          serializer.save()
  
      return Response(serializer.data)
  
  
  @todoappApi_view(['DELETE'])
  def taskDelete(request, pk):
      task = Task.objects.get(id=pk)
      task.delete()
  
      return Response('Item succsesfully delete!')
  </code></pre>
  <p>Here is the app urls:</p>
  <pre><code>from django.urls import path
  from . import views
  
  urlpatterns = [
      path('', views.todoappApiOverview, name=&quot;todoappApi-overview&quot;),
      path('task-list/', views.taskList, name=&quot;task-list&quot;),
      path('task-detail/&lt;str:pk&gt;/', views.taskDetail, name=&quot;task-detail&quot;),
      path('task-create/', views.taskCreate, name=&quot;task-create&quot;),
  
      path('task-update/&lt;str:pk&gt;/', views.taskUpdate, name=&quot;task-update&quot;),
      path('task-delete/&lt;str:pk&gt;/', views.taskDelete, name=&quot;task-delete&quot;),
  ]
  </code></pre>
  <p>Here is the app settings:</p>
  <pre><code>INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
  
      'todoappApi.apps.TodoappApiConfig',
      'rest_framework',
      'corsheaders',
  ]
  </code></pre>