我已閱讀5次文檔,我看不到這裏有什麼缺失。反向工程,但重定向失敗
我有一種情況,reverse()可以正常工作,但傳遞給redirect()的相同參數會失敗,並顯示地址無法解析的錯誤。
reverse("app:submission_thanks", kwargs={ "data": survey.data.slug, "survey": survey.slug })
redirect("app:submission_thanks", kwargs={ "data": survey.data.slug, "survey": survey.slug })
我的網址是:
return redirect(
reverse("app:submission_thanks",
kwargs={ "data": survey.data.slug, "survey": survey.slug }))