V
V
vikholodov2017-09-25 17:02:42
Django
vikholodov, 2017-09-25 17:02:42

How to import a model from another Django application?

in the orders application of the mysite project in the models.py file, I import a model from another application, and using the alt + enter key combination in Pycharm, this is what was automatically substituted:
from mysite.products.models import Product
But when I try to makemigrations, it gives an error

ModuleNotFoundError: No module named 'mysite.products'

Tried to import everything, but nothing works. Where to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Astrohas, 2017-09-25
@vikholodov

from products.models import Product

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question