Django活动流是否需要Comet(长时间轮询) [英] Does Comet(long polling) needed for Django activity stream

查看:67
本文介绍了Django活动流是否需要Comet(长时间轮询)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

没有人知道如何在模板上显示Django流操作.

Does anyone has idea how to display django stream actions on templates.

我是否需要使用Comet来获取要显示在模板上的值.因为,当我执行action.send时,它将动词和描述存储在表actstream_action中.但是我应该如何在模板上显示这些值?

Does I need to use Comet to fetch values to display on my template. Since, When I am doing action.send, it is storing verb and description in table actstream_action. But how should I display the values on template ?

P.S.请注意,这是我第一次使用 django-activity流.

P.S. Please note that this is first time I am using django-activity stream.

推荐答案

我检查了django-activity-stream,看来它没有动态更新活动的魔力.

I've checked django-activity-stream, seems it has no magic for rendering activity updating dynamically.

检查 django-socketio 以了解网络套接字的方式.或者,如果预期的访问负载不那么高,则轮询技术将满足您的要求.

Check django-socketio for websockets way. Or simply polling tech would satisfy your requirement if the expected access loading is not that high.

我不太确定您对使用各种模板标签直接将操作提取到模板的操作"的含义,因为模板渲染是在请求-响应过程中完成的.

I'm not quite sure what you mean about "fetch actions directly to template using various templatetags" because template rendering is accomplished during request-response proceduret.

这篇关于Django活动流是否需要Comet(长时间轮询)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆