[Django]-ImportError: cannot import name connections

5👍

The package haystack is conflicting django-haystack.
(Re)moving it will fix the issue.

See chat for details.

6👍

The above did not work for me.

What worked for me was this:

  • pip uninstall haystack

  • pip uninstall django-haystack

  • pip install django-haystack

1👍

Check if you have __init__.py file inside python sitepackages/haystack folder. This may be due to the absense of __init__.py. The __init__.py has the connection attribute. If that is not available try to uninstall and install/manually write the __init__.py file from github source.

Leave a comment