Django 1.9 can not find newapp

微笑、不失礼 提交于 2019-12-02 08:02:50

If your apps directory is in the myapps directory, then check the following:

  1. Your myapps directory should have an __init__.py

  2. Include myapps in the path when you include the app in INSTALLED_APPS, i.e. 'myapps.newapp.apps.NewAppConfig',

  3. Include myapps in the app config's name attribute:

    class NewAppConfig(AppConfig):
        name = 'myapps.newapp'
    

If your app is inside the "myapps" directory, you still need to include that in the path: "myapps.newapp.apps.NewAppConfig".

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