plone的html和javascript进度条

collective.progressbar的Python项目详细描述


集合.progressbar

这个产品为plone提供了一个基本的html和javascript进度条 对于长时间运行的服务器端进程(如导入或 出口。

要使用它,您只需触发两个事件。第一件事 初始化进度条视图:

from collective.progressbar.events import InitialiseProgressBar
from collective.progressbar.events import ProgressBar

title = 'Importing file'
bar = ProgressBar(self.context, self.request, title)
notify(InitialiseProgressBar(bar))

上面的progressbar类可以接受可选的视图参数 希望自定义进一步呈现进度条的视图。你 只需在自定义视图中包含progressbar宏。

要更新进度,您只需启动相应的事件:

from collective.progressbar.events import UpdateProgressEvent
from collective.progressbar.events import ProgressState

for index in range(101):
    progress = ProgressState(self.request, index)
    notify(UpdateProgressEvent(progress))

要查看进度条的工作方式,请安装包并浏览到 演示视图例如:http://localhost:8080/plone/@@collective.progressbar-demo

更改日志

0.5-2009-09-18

  • 初始版本

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何将异步类的结果放入mainActivity EditText   java LDAP目录管理器服务提供,OutOfMemory   java Cassandra NoHostAvailableException,但仍存在活动节点   springboot应用程序的java启动线程   如果poll不一定返回第一项,那么java是ConcurrentLinkedQueue的好选择吗?   解析XML时JSON中出现java意外字符串   当'key'是两个整数时,如何输出Java HashMap键?   java为什么不显示在jsp页面中   java使用流式API转换映射列表中的值   JavaJPA+Spring:基于在持久化实体之前接收到的值,将外键列映射到ID   java如何使用selenium读取pdf文件   Canny之后的java对象提取   DSpace没有列出集合,java。lang.NumberFormatException:null   java我可以为数据库表主键设置一个最大值吗?   java如何定义Javadoc链接,可以通过单击   @java/spring中的SessionAttribute是否丢失数据?