title: Can't import models to celery tasks.py file
body: <p>in my tasks.py file I want to import models from polls app, but I get <strong>django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet</strong> when starting the worker</p>
  
  <p>tasks.py</p>
  
  <pre><code>from __future__ import absolute_import
  import sys ,os
  from polls.models import User
  from .celery import app
  
  
  @app.task
  def add_user(user):
      # for user in users:
      print('urra')
      #user = User(user.first_name, user.last_name, user.email)
      # user.save()
  </code></pre>
  
  <p>celery.py:</p>
  
  <pre><code>from __future__ import absolute_import, unicode_literals
  from celery import Celery
  import os, sys
  from task import celery_config
  import dotenv
  from os.path import dirname, join
  
  app = Celery('task',
               broker='amqp://root:lusine_admin@localhost/task',
               backend='amqp://',
               include=['task.tasks'])
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "task.settings")
  app.config_from_object(celery_config)
  # app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
  
  if __name__ == '__main__':
      app.start()
  </code></pre>
  
  <p>Actaually I got error polls module not found, but then from bash I added it to pythonpath and know I get this error. </p>