Python Django ImportError: No module named website

余生长醉 提交于 2019-12-06 23:40:57

you have to make sure you create the app at the basic way: python manage.py startapp website and set the name of the apps in the settings INSTALLED_APPS.

Hey I was also facing same issue with "login" name.

my app name was "login" and have feature.py in the same.

when i try to import feature using

 from login import feature

IDE was not showing any issues. intellisense was working fine.

but when i tried to runserver it thrown ImportError: No module named feature. and as soon as i changed login to extended_login it worked.

So i think some Keywords are not acceptable as app names. You try changing your app name.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!