在 PyCharm 中打开 “Settings/Preferences” -> “Languages & Frameworks” -> “Django”。 勾上Enable Django support 然后配置好文件根目录就好了