📅  最后修改于: 2022-03-11 14:45:35.005000             🧑  作者: Mango
#For this example:
scores_url = reverse('get_scores', args=(obj.pk))
#putting a comma at the end of the args tuple fixes it.
scores_url = reverse('get_scores', args=(obj.pk,))
#Alternatively, as mentioned in the docs, using a list would work fine:
scores_url = reverse('get_scores', args=[obj.pk])