Browse Source

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

Batiste Bieler 9 years ago
parent
commit
1d131e9910

+ 1 - 1
examples/django/README.rst

@@ -53,7 +53,7 @@ Running a task
 
 
 .. code-block:: console
 .. code-block:: console
 
 
-    $ python ./manage.sh shell
+    $ python ./manage.py shell
     >>> from demoapp.tasks import add, mul, xsum
     >>> from demoapp.tasks import add, mul, xsum
     >>> res = add.delay(2,3)
     >>> res = add.delay(2,3)
     >>> res.get()
     >>> 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)
 #: from unwanted access (see userguide/security.html)
 CELERY_ACCEPT_CONTENT = ['json']
 CELERY_ACCEPT_CONTENT = ['json']
 CELERY_RESULT_BACKEND = 'db+sqlite:///results.sqlite'
 CELERY_RESULT_BACKEND = 'db+sqlite:///results.sqlite'
+CELERY_TASK_SERIALIZER = 'json'
 
 
 # Django settings for proj project.
 # 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
 sqlalchemy==1.0.9
+celery>=4.0