我正在嘗試使用 celery-progress 模塊向用戶顯示任務的進度,因為完成任務需要很多時間。但是,按照https://github.com/czue/celery-progress上的說明進行操作后,我在前端看到以下錯誤:-NoReverseMatch at /netadc/arista/views/getFabListArista/TRCW/Reverse for 'task_status' with arguments '('',)' not found. 1 pattern(s) tried: [u'celery_progress/(?P<task_id>[\\w-]+)/$']Request Method: GETRequest URL: http://x.x.x.x/netadc/arista/views/getFabListArista/TRCW/Django Version: 1.11Exception Type: NoReverseMatchException Value:Reverse for 'task_status' with arguments '('',)' not found. 1 pattern(s) tried: [u'celery_progress/(?P<task_id>[\\w-]+)/$']前端的 URL 模式var progressUrl = "{% url 'celery_progress:task_status' task_id %}";不起作用。當我將其更改為時,var progressUrl = "{% url 'celery_progress:task_status' 'task_id' %}";我沒有收到錯誤消息,但沒有任何任務正在運行。任何有關 django/python 的專家,請幫忙。
添加回答
舉報
0/150
提交
取消
