开发者

General Purpose Progressbar in Django

I want to make a little web-frontend for copying (rsync) and encoding (ffmpeg) files for my Server using Django.

And I want to keep track of the progress of the processes.

I saw a few jquery-scripts, but they are designed to be used with uploads, and I don't know enough javascript开发者_开发百科 to modify these scripts for my needs.

I want to write a script that retrieves the task status from a textfile and outputs a progressbar, but I've got no idea where to start.

Does somebody know a good tutorial to start with?

And sorry for my poor english.


See the code here http://www.djangosnippets.org/snippets/679/, it says "upload progress for multipart forms" but there is nothing specific to forms, you can use it anywhere with few tweaks.

General concept is:

  1. Write a web-service which can return data(e.g. JSON) about the progress.
  2. On client side use JavaScript to call progress API periodically use that info to update some client side element e.g. a text, width of an image, color of some div etc.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜