Trying out celery for django I ran into a problem with @task decorator. This is running on Windows 7.
In my celerytest.tasks module I have the following code
from celery import task
@task
def add(x,y):
return x + y
From the command prompt I run:
python manage.py shell
Trying to import my module from shell:
from celerytest.tasks import add
I get the following error:
>>> from celerytest.tasks import add
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "d:\...\celerytest\tasks.py", line 8, in <module>
@task
TypeError: 'module' object is not callable
I tried googling this for a long time, but it seems I am the only one in the world with this problem.