How to use DRF reverse to call a complex url from SimpleRouter ?
My URL is in two places: one for teams and one for games:
league.urls:
url(r'^team/', include('teams.urls')),
team.urls:
router = SimpleRouter() router.register(r'game', GameViewSet, 'games')
I am trying to reverse specify the url to update the game. Based on DRR SimpleRouter, it should be "/ team / {pk} / game / {pk}"
My test calls:
url = reverse('games-detail', args=[team.pk, game.pk])
But I get the following error:
raise error, v
source share