请帮助解决问题。
我安装了 django-shop 和 django-shop-categories。然后按照提供的说明进行操作。添加到settings.py:
SHOP_PRODUCT_MODEL = shop_categories.models.defaults.product.default.CategoryProduct
INSTALLED_APPS = (
........
.....
.....
'polymorphic', # We need polymorphic installed for the shop
'shop', # The django SHOP application
'shop.addressmodel',
'myshop', # the project we just created
'shop_categories',
'treeadmin',
)
added to urls.py:
urlpatterns += patterns('',
url(r'^catalog/', include('shop_categories.urls')),
......
.....
)
创建一个表:
python manage.py syncdb
结果,当您尝试运行站点团队时
python manage.py runserver
我收到以下报告错误:
File "/home/kalinin/.virtualenvs/searche_project/searche/searche/urls.py", line 15, in <module>
url(r'^catalog/', include('shop_categories.urls')),
File "/home/kalinin/.virtualenvs/searche_project/searche_env/local/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 26, in include
urlconf_module = import_module(urlconf_module)
File "/home/kalinin/.virtualenvs/searche_project/searche_env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/kalinin/.virtualenvs/searche_project/searche/shop_categories/urls.py", line 1, in <module>
from django.conf.urls.defaults import patterns, url
ImportError: No module named defaults