Search code examples
djangoceleryprogress-barcelery-task

django celery-progress: default messages of element 'progress-bar-message' replace custom message


I start using Django celery-progress and have an issue with messages displayed while waiting for task to start

in my template, I have customized progress-bar-message element with an icon and changing text Waiting for progress to start... for Waiting for import to start...:

<div id="progress-bar-message"><i class="fa fa-clock-o" aria-hidden="true"></i><span> Waiting for import to start...<span></div>

but even if my changes are displayed at start, it is change to Waiting for task to start... without icon...

I do not understand how to manage this


Solution

  • You will need to provide an onProgress() function when creating your CeleryProgressBar in javascript.

    By default, it calls onProgressDefault(), which has that text hardcoded. But it can be overridden with the user-provided onProgress()