Facebook喜欢使用django信号或通知的通知更新 [英] Facebook like notification updates using django signal or notification

查看:147
本文介绍了Facebook喜欢使用django信号或通知的通知更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果任何其他用户喜欢或发表用户博客或帖子的评论,我如何使用django通知或django信号来制作像Facebook更新通知,在用户配置文件中显示?

解决方案

对于活动Feed,我们使用 https://github.com/justquick/django-activity-stream 文档: http://justquick.github.com/django-activity-stream/



对于js小部件和实时通知,我们使用 https://github.com/subsume/django-subscription yourlabs的例子,这取决于redis,但你可以轻松地如果你真的想添加一个模型后端。 Redis是一个很好的选择,它是半兆字节的依赖。文件: http://django-social.rtfd.org



没有适当的元数据通知(通知组)的应用程序,但已经做了大量的研究。基本上你需要另外一个应用程序,一个MetaNotification模型,以及一些(管理命令,信号...),它将访问通知并创建MetaNotification实例。然后,您应该显示MetaNotification列表,而不是Activity或通知列表。



Finnaly,如果您想要可配置的电子邮件通知,那么您可以使用django通知: https://github.com/jtauber/django-notification 或这个看起来更好的应用程序: http://www.tomaz.me/django-notifications/



我没有意识到任何应用程序都这样做。 我喜欢说耐心和毅力:)


How can i use django-notifications or django-signals to make something like facebook updates notification that shows in the user profile if any other user likes or posts comments on user's blog or posts?

解决方案

For the activity feed, we use https://github.com/justquick/django-activity-stream Documentation: http://justquick.github.com/django-activity-stream/

For the js widget and live notifications, we use https://github.com/subsume/django-subscription yourlabs example, it depends on redis but you can easily add a model backend if you really want to. Redis is a good choices it's half a megabyte of dependency. Documentation: http://django-social.rtfd.org

There is no application that does meta-notifications ("notification groupping") properly but a lot of research has been done. Basically you need another app, with a MetaNotification model, and something (management command, signal ...) that will visit notifications and create MetaNotification instances. Then you should display MetaNotification lists rather than Activity or notification list.

Finnaly, if you want configurable email notifications then you can use django-notifications: https://github.com/jtauber/django-notification or this app which looks nicer: http://www.tomaz.me/django-notifications/

I'm not aware of any app that does it all. It is going to be some work for you.

"It's a long way to the top if you wanna rock'n'roll" or as I like to say "patience and perseverance" :)

这篇关于Facebook喜欢使用django信号或通知的通知更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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