Vote count:
0
I have an odd issue where I can import the Celery decrator when inside the management Django shell, but cannot when I try via one of the files within one of my apps.
Heres what I mean....
Within a tasks.py file within my app i have...
import celery
import pprint
pprint.pprint(dir(celery))
When I run the management shell Im shown the methods for celery. WHich there is no decorators for.
# python manage.py shell
['Celery',
'__builtins__',
'__doc__',
'__file__',
'__name__',
'__package__',
'absolute_import',
'app',
'importer',
'os',
'settings',
'site',
'sys']
However if I then import celery and check again I get all the correct methods...
>>> import celery
>>> import pprint
>>> pprint.pprint(dir(celery))
['Celery',
'SERIES',
'Task',
'VERSION',
'VERSION_BANNER',
'__all__',
'__author__',
'__contact__',
'__doc__',
'__docformat__',
'__file__',
'__homepage__',
'__package__',
'__path__',
'__version__',
'_find_option_with_arg',
'bugreport',
'chain',
'chord',
'chunks',
'current_app',
'current_task',
'decorators',
Any ideas ??
asked 49 secs ago
Aucun commentaire:
Enregistrer un commentaire