title: How start start celery worker in Django project
body: <p>I have a <code>Django</code> project with the directory structure mentioned below. I am trying to use <code>Celery</code> for running tasks in the background. I have facing some trouble while running the <code>worker</code>. Whenever I issue the following command, I get an error.</p>
  
  <p><strong>Command</strong></p>
  
  <pre><code>$ celery -A tasks worker --loglevel=info 
  </code></pre>
  
  <p>From the <code>project</code>directory where <code>manage.py</code> resides</p>
  
  <blockquote>
    <p>ModuleNotFoundError: No module named 'tasks'</p>
  </blockquote>
  
  <p>From the <code>project</code>directory where <code>celery.py</code> resides</p>
  
  <blockquote>
    <p>ModuleNotFoundError: No module named 'tasks'</p>
  </blockquote>
  
  <p>From the <code>app</code>directory where <code>tasks.py</code> resides</p>
  
  <blockquote>
    <p>AttributeError: module 'tasks' has no attribute 'celery'</p>
  </blockquote>
  
  <p><strong>Project Structure</strong></p>
  
  <pre><code>project
      |-- app
           |-- admin.py
           |-- apps.py
           |-- __init__.py
           |-- models.py
           |-- tasks.py
           |-- tests.py
           |-- urls.py
           |-- views.py
      |-- project
              |-- celery.py
              |-- settings.py
              |-- __init__.py
              |-- urls.py
              |-- wsgi.py
      |-- manage.py
  </code></pre>