how to reverse the URL of a ViewSet’s custom action in django restframework April 25, 2023 by Tarik You can use reverse just add to viewset’s basename action: reverse('myuser-gender') See related part of docs.