django-requestlogs
django-requestlogs copied to clipboard
How to use django-requestlogs with drf @actions???
I have ViewSet with drf @action
class SomeView(BaseViewSet):
requestlogs_action_names = {
'list': "Receiving",
"some_action": "some event has occurred",
}
...
@action(
methods=["get"],
detail=True,
url_path="some-action",
url_name="some-action",
)
def some_action(self, request, *args, **kwargs):
some_logic(kwargs)
return response
I can't get action_name to log
Its my log:
{'action_name': None, ... , ('full_path', '/api/some-action/'), ...}