ImportError: cannot import name 'get_core_apps'

306 views
Skip to first unread message

Aaron Kim

unread,
Aug 31, 2016, 12:14:28 PM8/31/16
to django-oscar
I am trying to build my own shop following the guide.

https://django-oscar.readthedocs.io/en/latest/internals/getting_started.html

After modifying settings.py and urls.py, I tried to do following

$ python manage.py migrate

But, I get this error message

ImportError: cannot import name 'get_core_apps'

The problematic setting is following but this is identical to sandbox site's configuration. So, I don't understand why error occurs. Any idea?

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.sitemaps',
    # Debug toolbar + extensions
    'debug_toolbar',
    'compressor',
    'widget_tweaks',
    'rosetta',          # For i18n testing
    'apps.gateway',     # For allowing dashboard access
]
from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps()

I have tried following, but still the same. 

 from oscar import get_core_apps
 INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.sitemaps',
    # Debug toolbar + extensions
    'debug_toolbar',
    'compressor',
    'widget_tweaks',
    'rosetta',          # For i18n testing
    'apps.gateway',     # For allowing dashboard access
] + get_core_apps()

Aaron Kim

unread,
Sep 1, 2016, 10:48:44 AM9/1/16
to django-oscar
No worries, this was due to not activating the virtualenv prior to executing the command. 
Reply all
Reply to author
Forward
0 new messages