giftzz hiyya_web git 19_initial_data python manage py initdb home ihor

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(giftzz)➜ hiyya_web git:(19_initial_data) ✗ python manage.py initdb
/home/ihor/bitbucket/giftzzz/wsgi/hiyya_web
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/core/management/__init__.py", line 75, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/ihor/bitbucket/giftzzz/wsgi/hiyya_web/hiyya_web/product/management/commands/initdb.py", line 13, in <module>
from hiyya_web.product.models import Brand, Product, ProductImage
File "/home/ihor/bitbucket/giftzzz/wsgi/hiyya_web/hiyya_web/product/models.py", line 20, in <module>
UserModel = get_user_model()
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 127, in get_user_model
user_model = get_model(app_label, model_name)
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/db/models/loading.py", line 271, in get_model
self._populate()
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in _populate
self.load_app(app_name)
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load_app
models = import_module('%s.models' % app_name)
File "/home/ihor/.virtualenvs/giftzz/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/ihor/bitbucket/giftzzz/wsgi/hiyya_web/hiyya_web/survey/models.py", line 5, in <module>
from hiyya_web.product.models import Product, Gift
ImportError: cannot import name Product
(giftzz)➜ hiyya_web git:(19_initial_data)