管理.py强制无人值守命令的标志?

2024-04-20 06:56:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在阅读本教程:Installing and Configuring Graphite and Statsd on an Ubuntu 12.04 VPS

我正在努力使一切都有可能实现自动化,那么本教程中有一个步骤让我疯狂:

Next, we will configure the Graphite database. Go to the Graphite webapp directory and run the database script:

cd /opt/graphite/webapp/graphite/
sudo python manage.py syncdb

我们要看,你要跑了管理.py当我运行syncdb时,询问创建超级用户的情况。我怎么才能避免呢?我想运行这些发送所有参数的自动脚本。在

有什么想法吗?在


Tags: andthepyanonubuntu教程statsd
1条回答
网友
1楼 · 发布于 2024-04-20 06:56:51

您可以使用the ^{} argument禁用the ^{} command的提示。在

noinput

Use the noinput option to suppress all user prompting, such as “Are you sure?” confirmation messages. This is useful if django-admin.py is being executed as an unattended, automated script.

相关问题 更多 >