python - Django: Celery import causes error while executing cron commands -
recently installed celery on django, works fine, realized cron (i mean usual cron, not celery's periodic tasks) commands doesn't execute. had lines in cron this:
sudo -u someuser python /home/someuser/django_proj/manage.py somecommand --settings=someapp.settings
and works well. if add "import djcelery" settings.py, have error:
unknown command: 'somecommand' type 'manage.py help' usage.
what doing wrong? p.s. know, celery has periodic tasks, can't use feature right now.
also, have "common_settings.py" file, , someapp/settings.py has code:
from common_settings import *
if add "import djcelery" common_settings.py got this:
error: can't find file 'settings.py' in directory containing '/home/someuser/django_proj/manage.py'. appears you've customized things. you'll have run django-admin.py, passing settings module. (if file settings.py indeed exist, it's causing importerror somehow.)
it tries find settings in django_proj folder, don't have settings here.
looks, you're not installed application correctly. example may forgot comma in installed_apps, , previous application not activating when django starts. no reasons broken.
Comments
Post a Comment