Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 django 项目的 app 文件夹中有一个 python 文件,我希望它在服务器启动时运行,我该怎么做?
将您的代码放在您__init__.py的应用程序文件夹的文件中。
__init__.py