【问题标题】:How to run django server from python script without using terminal? [duplicate]如何在不使用终端的情况下从 python 脚本运行 django 服务器? [复制]
【发布时间】:2019-06-17 06:29:24
【问题描述】:

通常在终端中使用 python manage.py runserver 启动 django 服务器。我想通过运行 python 脚本来运行服务器。该怎么做?

【问题讨论】:

  • 与问题无关的

标签: python django


【解决方案1】:

您可以让 Python 脚本使用os.system 执行命令:

os.system('python manage.py runserver')

【讨论】:

    猜你喜欢
    • 2018-11-20
    • 1970-01-01
    • 2016-09-18
    • 2022-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多