Everything worked fine until I had the need to import a custom model class that I created in the catalogue app.
My goal was to access this custom model for the price selection strategy.
in /apps/partner/strategy I tried to import the model like this:
CountrySpecificProductInformation = get_model('catalogue', 'CountrySpecificProductInformation')
this call raises a Model not Registered exception:
File "/home/matyas/virtenvs/oscar/local/lib/python2.7/site-packages/oscar/core/loading.py", line 250, in get_model
return apps.get_registered_model(app_label, model_name)
File "/home/matyas/virtenvs/oscar/local/lib/python2.7/site-packages/django/apps/registry.py", line 260, in get_registered_model
"Model '%s.%s' not registered." % (app_label, model_name))
LookupError: Model 'catalogue.CountrySpecificProductInformation' not registered.
my Installed apps settings look like this:
INSTALLED_APPS = ['...'] +
oscar.get_core_apps(['apps.catalogue', 'apps.promotions', 'apps.dashboard',
'apps.dashboard.catalogue', 'apps.partner', 'apps.payment', 'apps.dashboard.partners',
'apps.shipping', 'apps.checkout', 'apps.search'])
I am using django-oscar 1.3 with Django 1.9.9
related StackOverflow question:
Any ideas what would be the correct approach here?
Thank you very much,
Matyas