score:1

Accepted answer

you do not need to include ecomstore when importing. have you added catalog to your installed_apps in your settings.py in the ecomstore project folder?

e.g.:

installed_apps = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # uncomment the next line to enable the admin:
    'django.contrib.admin',
    # uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs',
    'catalog'
)

score:0

change the line to

from catalog.models import product

and it should work. the problem is it is looking for a module (directory) named 'ecomstore' within the directories on the search path. note that this is different to finding 'ecomstore' in the search path - it doesn't care what the directory names on the search path are, it just looks inside them.

score:0

shot in the dark: check your pythonpath settings in windows system settings. it used to be right clicking over the my pc icon and click on properties. one of the tabs will show you sistem paths.


Related Query

More Query from same tag