为了账号安全,请及时绑定邮箱和手机立即绑定

Celery-Progress-Bar 在 Django 中不起作用

Celery-Progress-Bar 在 Django 中不起作用

慕沐林林 2021-07-09 17:15:02
我正在尝试使用 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 的专家,请帮忙。
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 321 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号