iT邦幫忙

0

Django 參數傳遞問題

toad 2022-03-19 16:46:321065 瀏覽
  • 分享至 

  • xImage

各位好小弟我目前遇到一個問題
我想要將Line Bot接收到的清單資料同步顯示在網頁上https://ithelp.ithome.com.tw/upload/images/20220319/20146572Y3kTIb562Q.png
但試了很久都會接收到這個錯誤
https://ithelp.ithome.com.tw/upload/images/20220319/201465726Q0ZzkAHWW.png
以下是我的程式碼
呼叫
https://ithelp.ithome.com.tw/upload/images/20220319/201465722vnrhZmi1k.png
回傳
https://ithelp.ithome.com.tw/upload/images/20220319/20146572I5wWHorFWp.png
https://ithelp.ithome.com.tw/upload/images/20220319/20146572WMsuCx9diV.png
url
https://ithelp.ithome.com.tw/upload/images/20220319/20146572pQ7HzMX4ET.png
HTML
https://ithelp.ithome.com.tw/upload/images/20220319/20146572vOvlBXkxSg.png
我覺得我應該是犯了一個很簡單的錯誤/images/emoticon/emoticon16.gif
還請各位指導一下小弟/images/emoticon/emoticon06.gif

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
froce
iT邦大師 1 級 ‧ 2022-03-19 23:08:42
最佳解答

你url沒給參數欄位

'^test/(?P<event>\w+)/(?P<mtext>\w+)/$'

但不知道你django用啥版本,url已經很舊了。

toad iT邦新手 5 級 ‧ 2022-03-20 14:19:10 檢舉

Django 3.2.8
好的謝謝你我試看看

froce iT邦大師 1 級 ‧ 2022-03-21 16:14:18 檢舉

3.2.8 可以改用新的Path,相關的設定簡單許多,只有一般需求的話不需要懂regex。

https://docs.djangoproject.com/en/3.0/topics/http/urls/

我要發表回答

立即登入回答