我正在阅读本教程: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
如您所见,我们必须运行 manage.py 并且当我运行 syncdb 时询问有关创建 super 用户的信息。我怎样才能避免这种情况?我想运行这些发送所有参数来制作一个自动脚本。
有什么想法吗?
最佳答案
您可以使用 the --noinput
argument禁用 the syncdb
command 的提示.
--noinput
Use the
--noinput
option to suppress all user prompting, such as “Are you sure?” confirmation messages. This is useful ifdjango-admin.py
is being executed as an unattended, automated script.
关于python - manage.py 标志强制执行无人值守命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23202805/