I recently tried to get wagtail to work with my existing Django application. I got an error: -
ImportError: No module named wagtail
unable to load app 0 (mountpoint='') (callable not found or import error)
After significant troubleshooting, I managed to fix it by copying the wagtail folder from:
/usr/local/lib/python2.7/dist-packages/
here
/opt/django/src/
By eliminating this error, I received different information about another module, and another ... every time I copied the folder from /usr/local/lib/python2.7/dist-packages/
to /opt/django/src/
, and as a result, it resolved the problems that I had and the uWSGI started working.
Now, when I access the home page of my application, I get this error
ImportError at /
cannot import name pages
Request Method: GET
Request URL: http:
Django Version: 1.9
Exception Type: ImportError
Exception Value:
cannot import name pages
Exception Location: ./wagtail/wagtailadmin/urls/__init__.py in <module>, line 4
Python Executable: /usr/local/bin/uwsgi
Python Version: 2.7.3
Python Path:
['.',
'',
'/opt/django/src',
'/root/.python',
'/opt/django/env/lib/python2.7',
'/opt/django/env/lib/python2.7/plat-linux2',
'/opt/django/env/lib/python2.7/lib-tk',
'/opt/django/env/lib/python2.7/lib-old',
'/opt/django/env/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/opt/django/env/local/lib/python2.7/site-packages',
'/opt/django/env/lib/python2.7/site-packages']
I checked the file referenced by ( ./wagtail/wagtailadmin/urls/__init__.py
) and it looks like this:
from django.conf.urls import url, include
from django.views.decorators.cache import cache_control
from wagtail.wagtailadmin.urls import pages as wagtailadmin_pages_urls
from wagtail.wagtailadmin.urls import collections as wagtailadmin_collections_urls
from wagtail.wagtailadmin.urls import password_reset as wagtailadmin_password_reset_urls
from wagtail.wagtailadmin.views import account, chooser, home, pages, tags, userbar
from wagtail.wagtailadmin.api import urls as api_urls
from wagtail.wagtailcore import hooks
from wagtail.utils.urlpatterns import decorate_urlpatterns
from wagtail.wagtailadmin.decorators import require_admin_access
Offensive line - this is the first shake "of" ...
from wagtail.wagtailadmin.urls imports pages as wagtailadmin_pages_urls
?