Closed stuart-bradley closed 5 years ago
The README shows to define it as a renderer in the parent class, for example:
class UserViewSet(XLSXFileMixin, viewsets.ModelViewSet):
"""
A viewset that provides the standard actions
"""
queryset = User.objects.all()
serializer_class = UserSerializer
renderer_classes = (XLSXRenderer,)
filename = 'my_export.xlsx'
@action(detail=True, methods=['post'])
...etc...
Have you tried setting the renderer on the parent class rather than within the method?
@lutrasdebtra Any further information?
Closing, no response.
Having a little trouble figuring out how to get this library to work. It's not quite as simple as:
So a little guidance would be appreciated for those of us who can't figure it out!