Reverse With Prefix Argument After Must Be

[Solved] Reverse With Prefix Argument After Must Be | Scala - Code Explorer | yomemimo.com
Question : _reverse_with_prefix() argument after * must be an iterable, not int

Answered by : jocelyn

#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])

Source : https://stackoverflow.com/questions/52575418/reverse-with-prefix-argument-after-must-be-an-iterable-not-int/52575419 | Last Update : Mon, 04 Oct 21

Answers related to reverse with prefix argument after must be an iterable not int

Code Explorer Popular Question For Scala