Re: ListCreateAPIView Django rest framework Method \"POST\" not allowed

2020-09-25 Thread Linovia
Hi, What does your router look like ? Regards, Xavier O. Le 25 sept. 2020 à 13:48 +0200, Pradyum Gupta , a écrit : > See I don't know this is actually a very weird error that am receiving. > > Inside *Company App* > > views.py > ```python3 > class CompanyView(generics.ListCreateAPIView): >     q

Re: Serializer error fixed by print?

2020-05-18 Thread Linovia
You probably have a queryset somewhere that is evaluated with the print and isn’t without. Point is, it may delay synchronous DB requests in an asynchronous code which would raise the error. Regards, Xavier O. Le 18 mai 2020 à 22:47 +0200, sebastian wrzalek , a écrit : > Hello, > I have found ve

Re: Is it possible to send HTTP DELETE or PATCH from DRF web page with a web browser ?

2020-04-22 Thread Linovia
. Regards, Xavier O. Linovia. Le 22 avr. 2020 à 15:41 +0200, Olivier Krief , a écrit : > Hello, > > I'm discovering DRF. > > Is it possible to send HTTP DELETE or PATCH from DRF web page ? > > > > > > When I type http://foo/api/friends/3/ in my browser, I'm seei

Re: Prefetch invalidation on an update operation

2020-04-17 Thread Linovia
Indeed the preftech cache is emptied before returning the result of an update: https://github.com/encode/django-rest-framework/blob/master/rest_framework/mixins.py#L73 This is due to some side effects with many to many fields after an update: https://github.com/encode/django-rest-framework/issues/

Re: Response 4xx rolls back database

2020-03-30 Thread Linovia
Hi, If you want to apply changes and return a 400 error code, you’ll need to commit the current transaction. Browse the Django documentation about transaction and you’ll find how to do that. Regards, Xavier O. Linovia. Le 30 mars 2020 à 18:44 +0200, theo , a écrit : > Hey > > I hav

Re: get_serializer_class don't work in GenericViewSet

2019-11-22 Thread Linovia
Hi, Can you elaborate on the « don’t work » part ? I have been using get_serializer_class and it has always worked well to me with GenericViewSet. Regards, Xavier O. Linovia Le 22 nov. 2019 à 02:22 +0100, Cristian Benavides Jimenez , a écrit : > Hi everybody, > > I try use a two seria