As a user I want to get returned file based on my request. For example, I whant to return file name based on request path:
GET /users -> will return file name 'users_list.xlsx'
GET /users/2 -> will return file name 'user_2_details.xlsx'
That is pretty easy to do: add to XLSXFileMixin.get_filename method parameters (self, request, *args, **kwargs) and pass them from finalize_response method. Thus developer may override XLSXFileMixin with correct file name getter based on request processing.
As a user I want to get returned file based on my request. For example, I whant to return file name based on request path:
That is pretty easy to do: add to
XLSXFileMixin.get_filename
method parameters(self, request, *args, **kwargs)
and pass them fromfinalize_response
method. Thus developer may override XLSXFileMixin with correct file name getter based on request processing.