高远介绍的好东东--django-celery
2015-10-29 14:10
465 查看
终于可以到异步消息机制的高档产品啦~~~
不知能不能代替AJAX。。
参照官方文档试下:
中文文档:
http://docs.jinkan.org/docs/celery/getting-started/brokers/rabbitmq.html http://docs.celeryproject.org/en/2.5/django/first-steps-with-django.html
tasks.py
settings.py可以这样配(用DJANGO的库):
不知能不能代替AJAX。。
参照官方文档试下:
中文文档:
http://docs.jinkan.org/docs/celery/getting-started/brokers/rabbitmq.html http://docs.celeryproject.org/en/2.5/django/first-steps-with-django.html
tasks.py
from celery import task @task() def add(x, y): return x + y
settings.py可以这样配(用DJANGO的库):
import djcelery djcelery.setup_loader() BROKER_URL = 'django://' ..... # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ..... 'djcelery', 'celerytest', 'kombu.transport.django', )
相关文章推荐
- GOF共23种设计模式
- 我的django之旅(四)模型,模板和视图
- Gomoku五子棋OC实现
- golang反射与反射三法则
- HDU_3666_THE MATRIX PROBLEM(差分约束+spfa+slf优化)
- Algorithms—68.Text Justification
- django modeForm总结!
- 收藏的兼容各浏览器的日历控件(ie6-11\ff\google\safri)
- django models 晋级
- django rest framework - 数据解析
- Sublime Text3 + Golang搭建开发环境
- jango.contrib.sessions-SessionBase
- django.session-middleware
- django-admin sites
- django.core-validators
- django.forms.widget-ChoiceFieldRenderer
- django.forms.widget-ChoiceInput
- Hello,Algorithm!(你好,算法!)
- django.forms-Widget和Media间的联系
- dajngo.forms.widget-Media