C.K.
C.K.

Reputation: 5518

pycharm django debug configrations doesn't recognize apps folder

All my apps are in apps folder

I also added sys.path.insert(0, os.path.join(BASE_DIR, "apps")) in settings.py

my project structure as below:

enter image description here

But when I simply create and run a default Django Server in Pycharm (2019.1) enter image description here

It returned an error

...  'apps' is not a package

My project runs perfectly in pipenv shell; python manage.py runserver Can anyone help me, please?

Upvotes: 0

Views: 68

Answers (1)

C.K.
C.K.

Reputation: 5518

I figure out it's due to the Content Root setting

My Git root is dwhnt but my Django root is dwhnt/proj After deleting the old Content Root and set it with as below it works

enter image description here

Upvotes: 1

Related Questions