title: Suddenly my api_view is not defined. Why?
body: <p>I am making a webpage using React frontend and Django backend. I have trouble running my backend because things supposedly aren't defined. E.g. I get this message when trying to run</p>
  <pre><code>python manage.py makemigrations
  </code></pre>
  <p>getting error,</p>
  <pre><code>name 'api_view' is not defined
  </code></pre>
  <p>What can I do to fix it?</p>
  <pre><code>from django.http import HttpResponse
  from .serializers import UserSerializer
  
  def homePageView(request):
      return HttpResponse('Hello, World!')
  
  # 
  @api_view(['POST'])
  def createUserView(request):
      # Create a new user 
      if request.method == 'POST':
          # Create serializer with data from new user object
          serializer = UserSerializer(data=request.data) #datafeltet inneholder json fra frontend, se eks. nederst
      if serializer.is_valid():
          # Save user
          serializer.save()
          return Response(serializer.data, status=status.HTTP_201_CREATED)
      return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  
      #return HttpResponse('User')
  </code></pre>