Error on create a request

Hello, help please

FieldError at /teste/create_teste/

Request Method: POST
Request URL: http://127.0.0.1:8000/teste/create_teste/
Django Version: 4.1.2
Exception Type: FieldError
Exception Value: Cannot resolve keyword ‘data’ into field. Choices are: id, nome

here is code

model
from django.db import models
class Teste(models.Model):
nome = models.CharField(max_length = 100)

serializer
from rest_framework import serializers
from .models import Teste
class TesteSerializer(serializers.ModelSerializer):
class Meta:
model = Teste
fields = ‘all

view
from .models import Teste
from .serializer import TesteSerializer
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.parsers import JSONParser

@api_view([‘POST’])
def create_teste(request):
#data = JSONParser().parse(request)
teste = Teste.objects.get(data = request.data)
serializer = TesteSerializer(teste)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
else:
return Response(serializer.errors)

First, a side note: When posting code here, please enclose your code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This will force the forum software to keep your code properly formatted, which is critical with Python.

Side note #2: When requesting assistance with an error, it’s generally more useful to copy the error from the console in which you’re running your server to get the full traceback. That complete traceback provides more information than what’s provided in the browser response.

This is the line causing the error:

As the error message states, you don’t have a field named data in the Teste model.

Review the docs at Retrieving specific objects with filters and Playing with the api.