diefenbach / django-lfs

An online-shop based on Django
http://www.getlfs.com
BSD 3-Clause "New" or "Revised" License
622 stars 222 forks source link

Circular import during migration to 0.8 #115

Closed voronind closed 11 years ago

voronind commented 11 years ago

Migrate from 0.7.7 to 0.8

python manage.py lfs_migrate

File "manage.py", line 11, in execute_manager(settings) File "/home/dimka/Dropbox/Work/dice64/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 438, in execute_manager utility.execute() File "/home/dimka/Dropbox/Work/dice64/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/dimka/Dropbox/Work/dice64/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 261, in fetch_command klass = load_command_class(app_name, subcommand) File "/home/dimka/Dropbox/Work/dice64/env/local/lib/python2.7/site-packages/django/core/management/init.py", line 67, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "/home/dimka/Dropbox/Work/dice64/env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module import(name) File "/home/dimka/Dropbox/Repos/django-lfs/lfs/core/management/commands/lfs_migrate.py", line 16, in from lfs.order.models import Order File "/home/dimka/Dropbox/Repos/django-lfs/lfs/order/models.py", line 12, in import lfs.payment.utils File "/home/dimka/Dropbox/Repos/django-lfs/lfs/payment/utils.py", line 5, in import lfs.core.utils File "/home/dimka/Dropbox/Repos/django-lfs/lfs/core/utils.py", line 21, in from lfs.core.models import Shop File "/home/dimka/Dropbox/Repos/django-lfs/lfs/core/models.py", line 256, in from monkeys import * File "/home/dimka/Dropbox/Repos/django-lfs/lfs/core/monkeys.py", line 7, in from lfs.cart import utils as cart_utils File "/home/dimka/Dropbox/Repos/django-lfs/lfs/cart/utils.py", line 10, in from lfs.payment import utils as payment_utils ImportError: cannot import name utils

pigletto commented 11 years ago

This is strange as I tried 0.8 migration before and it all went smoothly with no circular import errors. Anyway, please try now with latest commit.

voronind commented 11 years ago

payment_utils doesn't use in lfs/cart/utils.py And other imports too

pigletto commented 11 years ago

Does it work now for you?

voronind commented 11 years ago

Looks good. Thank you.