浏览代码

Update the demo project so it works with the latest Django and celery

Batiste Bieler 9 年之前
父节点
当前提交
1d131e9910
共有 3 个文件被更改,包括 4 次插入2 次删除
  1. 1 1
      examples/django/README.rst
  2. 1 0
      examples/django/proj/settings.py
  3. 2 1
      examples/django/requirements.txt

+ 1 - 1
examples/django/README.rst

@@ -53,7 +53,7 @@ Running a task
 
 .. code-block:: console
 
-    $ python ./manage.sh shell
+    $ python ./manage.py shell
     >>> from demoapp.tasks import add, mul, xsum
     >>> res = add.delay(2,3)
     >>> res.get()

+ 1 - 0
examples/django/proj/settings.py

@@ -12,6 +12,7 @@ CELERY_BROKER_URL = 'amqp://guest:guest@localhost//'
 #: from unwanted access (see userguide/security.html)
 CELERY_ACCEPT_CONTENT = ['json']
 CELERY_RESULT_BACKEND = 'db+sqlite:///results.sqlite'
+CELERY_TASK_SERIALIZER = 'json'
 
 # Django settings for proj project.
 

+ 2 - 1
examples/django/requirements.txt

@@ -1,2 +1,3 @@
-django==1.8.4
+django==1.9.5
 sqlalchemy==1.0.9
+celery>=4.0