Импорт моделей в командный файл вызывает ошибку Error module not found django
Я пытаюсь импортировать модели моего приложения в update.py, расположенный внутри website/management/commands, зная, что website - это мое приложение, проблема в том, что нет модуля с именем 'website', даже если я упомянул его в Installed_APPS в settings.py:
вот мой файл update.py :
from django.core.management.base import BaseCommand
import pandas as pd
#from website.models import Product
from website.models import Main_data
class Command(BaseCommand):
help='import booms'
def add_arguments(self, parser):
pass
def handle(self,*args,**options):
df=pd.read_excel('main.xlsx',engine='openpyxl')
for P_N,P_P,P_L,P_I,P_Logo in zip(df.Product_Name,df.price,df.Link,df.Image,df.Logo):
models=Data_Main(Product_Name=P_N,Product_Price=P_P,Product_Link=P_L,Product_Image=P_I,Product_Logo=P_Logo)
models.save()
вот ошибка, которую я получаю :
Traceback (most recent call last):
File "C:\Users\dell\Desktop\tam\website\management\commands\update.py", line 4, in <module>
from website.models import Main_data
ModuleNotFoundError: No module named 'website'
это мой раздел INSTALLED_APPS, расположенный в моем settings.py :
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'website',
]