django-shop
django-shop copied to clipboard
Order workflow mixin documentation
I talked to a user today who ran into the issue described by the traceback below.
As far as I understand, the problem is that he was using CommissionGoodsWorkflowMixin
and PartialDeliveryWorkflowMixin
at the same time, which is not supported. This is mentioned in the docstring of CommissionGoodsWorkflowMixin
, but we should docment it more clearly in the to-be-written "manual setup" documentation.
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/rene/.virtualenvs/stevensons/lib/python3.4/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/rene/.virtualenvs/stevensons/lib/python3.4/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/home/rene/.virtualenvs/stevensons/lib/python3.4/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/rene/.virtualenvs/stevensons/lib/python3.4/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/home/rene/.virtualenvs/stevensons/lib/python3.4/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/home/rene/.virtualenvs/stevensons/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/tmp/stevensons-test/promotions/models.py", line 7, in <module>
from products.models import Product
File "/tmp/stevensons-test/products/models.py", line 26, in <module>
from shop.models.defaults.order import Order # noqa
File "/home/rene/.virtualenvs/stevensons/lib/python3.4/site-packages/shop/models/defaults/order.py", line 10, in <module>
class Order(order.BaseOrder):
File "/home/rene/.virtualenvs/stevensons/lib/python3.4/site-packages/shop/models/order.py", line 115, in __new__
raise ImproperlyConfigured(msg.format(b.__name__, ', '.join(TRANSITION_TARGETS.keys())))
django.core.exceptions.ImproperlyConfigured: Mixin class PartialDeliveryWorkflowMixin already contains a transition named 'ship_goods, pick_goods, pack_goods'