Compatibility between Django Rest Framework versions

2019-02-15 Thread Pavlo Ivanchyshyn
I'm trying to add a new record into Mongo DB using Django REST Framework: def post(self, request, *args, **kwargs): data = request.data serializer = self.serializer_class(data=data) serializer.is_valid(raise_exception=True) During data serialization I've got an error: `Serializer X.Y

Login in the Browsable API leads to 404 error

2019-02-15 Thread Edely Gomes
Hello, everybody. I am not sure if I should post this here, but I am having problems with the Browsable API. I am following the tutorial from the website and trying to implement the login in the Browsable API

Re: Best way to add bulk operation routes under standard ModelViewSet route

2019-02-15 Thread Carlton Gibson
HI Clara. Nothing wrong with any of the options... I personally would use option 4, declaring an APIView class (or GenericAPIView subclass as appropriate) for each endpoint, abstracting any re-usable bit, like the serialiser class or what-not. You can add extra actions to your viewset. That’

Best way to add bulk operation routes under standard ModelViewSet route

2019-02-15 Thread Clara Daia
Hello, guys I have a standard ModelViewSet for a certain model Resource at /api/resources/. I am now implementing asynchronous bulk operations and would like to associate them to /api/resources/bulk_create/, /api/resources/bulk_update/ and /api/resources/bulk_delete/, each one accepting a POST req