Error on create a request

Hello, help please

FieldError at /teste/create_teste/

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

here is code

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

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

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

def create_teste(request):
#data = JSONParser().parse(request)
teste = Teste.objects.get(data =
serializer = TesteSerializer(teste)
if serializer.is_valid():
return Response(
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.