This article mainly describes the Pycharm will be in the Django multiple apps to the same folder application processing method, has a certain reference value, now share to everyone, the need for friends can refer to
To create multiple apps in Django, you need to create an apps file that puts all the apps in the same folder, which is clearer and more prescriptive.
First, in the project file right-click the-–new–python package to create an apps file, drag all the apps into apps,
Pop-up dialog box to search for references and open moved files in editor uncheck, click Confirm, this time run click Run, there will be a run error
In Check_apps_ready raise Appregistrynotready ("apps aren ' t loaded yet.") Django.core.exceptions.AppRegistryNotReady:Apps aren ' t loaded yet.
Right click on the Apps folder – Select Mark Directory as--Select sources root and click Run to run
This time can be used normally in pycharm, but if not in the actual environment of the deployment, you need to include in the setting.py file
Sys.path.insert (0,os.path.join (Base_dir, ' apps ')
This allows for normal use in the actual deployment.