drf-tracking
drf-tracking copied to clipboard
LogginMixin not gets called with ModelViewSet in Django 2.0.4
Django: 2.0.4, python: 3.5.3
class BookingViewSet(viewset.ModelViewSet, LoggingMixin):
def get_queryset(self):
return Booking.objects.all()
def get_serializer_class(self):
return BookingSerializer
After making multiple calls to this api viewset, no records added in API REQUEST LOGS.
@amankumarjain Have you tried the following:
class BookingViewSet(LoggingMixin, viewset.ModelViewSet):
The readme examples have the LoggingMixin
first. Not sure logging will work if ModelViewSet
is before the LoggingMixin
.
@avelis Having the same issue here with django 1.11 Have put LoggingMixin before ModelViewSet but no luck.
Django 2.0.8, python 3.6.8, DRF 3.8.2
class RespuestaModelViewSet(LoggingMixin, viewsets.ModelViewSet):
...
http_method_names = ['post', 'put', 'patch']
logging_methods = ['POST', 'PUT', 'PATCH']
i have same issue