简体   繁体   中英

Cannot import module in Django project

My Django project directory looks like this: 在此处输入图像描述

I can import from the CPRS_admin app folder to my main folder and it works fine.But the moment I import the CPRS_admin app folder to the recommendation_model app folder it shows the error ModuleNotFound.

在此处输入图像描述

This is the image of the import of CPRS_admin into CPRS and it works.

在此处输入图像描述

But the moment when I import CPRS_admin into a file under the recommendation_model app it shows this error.

在此处输入图像描述

You need to add CPRS_admin to CPRS/settings.py

INSTALLED_APPS = ['CPRS_admin',...]

Have you added CPRS_admin to installed apps in settings.py?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM