Satchmo 的分层运输问题
当我尝试在商店中使用分层运输模块时,出现以下错误:
TypeError at /shop/checkout/dummy/
object.__init__() takes no parameters
Request Method: GET
Request URL: http://127.0.0.1:8000/shop/checkout/dummy/
Exception Type: TypeError
Exception Value:
object.__init__() takes no parameters
Exception Location: ../../apps/shipping/modules/tiered/models.py in __init__, line 28
Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response
92. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "../../apps/payment/modules/dummy/views.py" in pay_ship_info
10. return payship.credit_pay_ship_info(request, dummy)
File "../../apps/payment/views/payship.py" in credit_pay_ship_info
141. return base_pay_ship_info(request, payment_module, credit_pay_ship_process_form, template)
File "../../apps/payment/views/payship.py" in base_pay_ship_info
132. results = form_handler(request, contact, working_cart, payment_module)
File "../../apps/payment/views/payship.py" in credit_pay_ship_process_form
79. form = _get_form(request, payment_module, *args, **kwargs)
File "../../apps/payment/views/payship.py" in _get_form
65. form = formclass(request, payment_module, *args, **kwargs)
File "../../apps/payment/forms.py" in __init__
226. super(CreditPayShipForm, self).__init__(request, paymentmodule, *args, **kwargs)
File "../../apps/payment/forms.py" in __init__
178. shipping_choices, shipping_dict = _get_shipping_choices(request, paymentmodule, self.tempCart, self.tempContact, default_view_tax=default_view_tax)
File "../../apps/payment/forms.py" in _get_shipping_choices
40. methods = shipping_methods()
File "../../apps/shipping/config.py" in shipping_methods
49. methods.extend(module.get_methods())
File "../../apps/shipping/modules/tiered/__init__.py" in get_methods
7. return [Shipper(carrier) for carrier in Carrier.objects.filter(active=True).order_by('ordering')]
File "../../apps/shipping/modules/tiered/models.py" in __init__
28. super(BaseShipper, self).__init__(self)
Exception Type: TypeError at /shop/checkout/dummy/
Exception Value: object.__init__() takes no parameters
我也在数据库中输入了承运商。
有人可以在这方面帮助我吗?
When I try to use the tiered shipping module in my store, I get the following error:
TypeError at /shop/checkout/dummy/
object.__init__() takes no parameters
Request Method: GET
Request URL: http://127.0.0.1:8000/shop/checkout/dummy/
Exception Type: TypeError
Exception Value:
object.__init__() takes no parameters
Exception Location: ../../apps/shipping/modules/tiered/models.py in __init__, line 28
Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response
92. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "../../apps/payment/modules/dummy/views.py" in pay_ship_info
10. return payship.credit_pay_ship_info(request, dummy)
File "../../apps/payment/views/payship.py" in credit_pay_ship_info
141. return base_pay_ship_info(request, payment_module, credit_pay_ship_process_form, template)
File "../../apps/payment/views/payship.py" in base_pay_ship_info
132. results = form_handler(request, contact, working_cart, payment_module)
File "../../apps/payment/views/payship.py" in credit_pay_ship_process_form
79. form = _get_form(request, payment_module, *args, **kwargs)
File "../../apps/payment/views/payship.py" in _get_form
65. form = formclass(request, payment_module, *args, **kwargs)
File "../../apps/payment/forms.py" in __init__
226. super(CreditPayShipForm, self).__init__(request, paymentmodule, *args, **kwargs)
File "../../apps/payment/forms.py" in __init__
178. shipping_choices, shipping_dict = _get_shipping_choices(request, paymentmodule, self.tempCart, self.tempContact, default_view_tax=default_view_tax)
File "../../apps/payment/forms.py" in _get_shipping_choices
40. methods = shipping_methods()
File "../../apps/shipping/config.py" in shipping_methods
49. methods.extend(module.get_methods())
File "../../apps/shipping/modules/tiered/__init__.py" in get_methods
7. return [Shipper(carrier) for carrier in Carrier.objects.filter(active=True).order_by('ordering')]
File "../../apps/shipping/modules/tiered/models.py" in __init__
28. super(BaseShipper, self).__init__(self)
Exception Type: TypeError at /shop/checkout/dummy/
Exception Value: object.__init__() takes no parameters
I have entered the carriers in database as well.
Can anyone help me in this regard ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将其更改为
change it to
在我看来,这就像一个 bug,存在于 Satchmo 后备箱中。
将 satchmo/apps/shipping/modules/tiered/models.py 中的第 28 行更改为:
并重新运行。
That looks to me like a bug and is present in Satchmo trunk.
Change line 28 in satchmo/apps/shipping/modules/tiered/models.py to:
and re-run.