Ok, I have a GenericAPIView that is supposed to generate a form in the Browsable API cause it declares a post method:
from rest_framework import status
from rest_framework.generics import GenericAPIView
from rest_framework.response import Response
from transacciones.serializers import BillSerializer
class ProcessBill(GenericAPIView):
serializer_class = BillSerializer
def post(self, request):
recieved_data = request.data
print(recieved_data)
return Response("Processed Bill", status=status.HTTP_200_OK)
But it doesn't generate a form. The view looks like this (it is in spanish, I translated the code to english so it is be more confortable to read):
I understand I get a 405 Method not Allowed cause I don't define a get method, only a post.
Im using Django 1.8, Django REST Framework 3.3.1 and python 3.4. I'm lost here. Any ideas?
EDIT
Also, if I use Postman (Chrome add on) the view responds correctly.

GenericAPIView, the old one uses aAPIView. The difference is stated in the answer to this question by TomChristie : stackoverflow.com/questions/14616489/… - Alejandro VeintimillaGenericAPIViewsuse acreate(request, *args, **kwargs)method, notpost- GeotobGenericAPIViewextends from theAPIView, that what the docs say ... so it should have apostmethod. - Alejandro Veintimilla