开发者

What does INSTALLED_APPS setting in Django actually do?

开发者 https://www.devze.com 2023-03-04 04:47 出处:网络
What does this actually do? I recently branched out my project from 1 app into 6 different apps and forgot to update the INSTALLED_APPS part of my settings file. Everything still works even though I d

What does this actually do? I recently branched out my project from 1 app into 6 different apps and forgot to update the INSTALLED_APPS part of my settings file. Everything still works even though I didn't list the new apps in. Is that supposed to happen开发者_如何学JAVA? Do I need to include all my apps in INSTALLED_APPS?


yes.

INSTALLED_APPS helps django to sync the database, run tests, get the urls to work and more related issues.

Maybe your installed apps still works because the main one calls the others with imports, a django app is nothing more that a simple python module that is imported when called in the settings file, that's why you get a invalid syntax error after you run the development server because an import won't work with invalid syntax.

0

精彩评论

暂无评论...
验证码 换一张
取 消