Home > Back-end >  Cannot import module in Django project
Cannot import module in Django project

Time:01-26

My Django project directory looks like this : enter image description here

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.

enter image description here

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

enter image description here

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

enter image description here

CodePudding user response:

You need to add CPRS_admin to CPRS/settings.py

INSTALLED_APPS = ['CPRS_admin',...]

CodePudding user response:

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

  •  Tags:  
  • Related