Портирую существующий проект ecomstore (по книге Beginning Django E-commerce ) с django 1.1 на 1.4
для catalog/views.py имею
from future import absolute_import
from django.shortcuts import get_object_or_404, render_to_response
from catalog.models import Category, Product
from django.template import RequestContext
from catalog.forms import ProductAddToCartForm
from cart import cart
import cart
Тем не менее получаю
AttributeError at /product/shurupy/
'module' object has no attribute 'add_to_cart'
Request Method: POST
Request URL: http://localhost:8001/product/shurupy/
Django Version: 1.4
Exception Type: AttributeError
Exception Value:
'module' object has no attribute 'add_to_cart'
Exception Location: /root/src/django/ecomstore/catalog/views.py in show_product, line 46
Python Executable: /usr/bin/python
Python Version: 2.6.6
Python Path:
['/root/src/django/ecomstore',
'/usr/lib/python2.6/site-packages/pip-1.1-py2.6.egg',
'/usr/lib/python26.zip',
'/usr/lib/python2.6',
'/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk',
'/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload',
'/usr/lib/python2.6/site-packages',
'/usr/lib/python2.6/site-packages/PIL',
'/usr/lib/python2.6/site-packages/gtk-2.0',
'/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info']
Помощь, уроки, репетиторство ( в личку ) - только приветствуется
Пожалуйста, помогите
Updated 6 June 2012, 23:24 by vvg.