python - ImportError: No module named apps error in Django Oscar - while including an app in INSTALLED_APPS -


i received error when tried customize oscar , add app called promotions under installed_apps

(oscar)macs-macbook-air:cyshop mac$ python manage.py migrate traceback (most recent call last):   file "manage.py", line 10, in <module>     execute_from_command_line(sys.argv)   file "/users/mac/virtualenvs/oscar/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line     utility.execute()   file "/users/mac/virtualenvs/oscar/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute django.setup()   file "/users/mac/virtualenvs/oscar/lib/python2.7/site-packages/django/__init__.py", line 18, in setup     apps.populate(settings.installed_apps)   file "/users/mac/virtualenvs/oscar/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate     app_config = appconfig.create(entry)   file "/users/mac/virtualenvs/oscar/lib/python2.7/site-packages/django/apps/config.py", line 112, in create     mod = import_module(mod_path)   file   "/usr/local/cellar/python/2.7.10_2/frameworks/python.framework/versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module     __import__(name) importerror: no module named apps 

i not sure if not able pick apps folder under have added promotions.

settings.py looks :

installed_apps = [     'django.contrib.admin',     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.messages',     'django.contrib.staticfiles',     'django.contrib.sites',     'django.contrib.flatpages',     'compressor',     'widget_tweaks' ]  oscar import get_core_apps  installed_apps = installed_apps + get_core_apps( ['apps.promotions']) 

my file structure is: |cyshop

|_init_.py  |db.sqlite3  |manage.py  |settings.py  |apps        |_init_.py       |promotions            |_init_.py            |models.py  |urls.py  |wsgi.py 

please me out. not sure why importerror takes place when add attribute get_core_apps()

you must agragar module (apps) installed_apps.es say

installed_apps = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.flatpages', 'compressor', 'widget_tweaks', "apps", 

]


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -