1.使用教程學習的時候,會遇到修改鏈接的硬編碼的問題
2.修改后發(fā)先一直會提示錯誤
Exception Type: NoReverseMatchException Value: Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not found.
3.一直懷疑是urls的正則表達式錯誤,或者域名空間的問題
4.經過查詢發(fā)現是 使用question_id代替了question.id
In your?index.html?you gave?poll_id?as an argument, but that's just the name the argument will have within the?detail?function; it is not defined in your template. The actual value you want to call the function with is probably?poll.id.
至此這個問題得以解決