我正在Windows機器上開發(fā)基于django的站點,但是我將所做的更改推送到了無頭的Ubuntu服務(wù)器上以進行登臺。當(dāng)我git將更改拉到登臺服務(wù)器上的工作目錄中時,我需要運行manage.py collectstatic。但是,當(dāng)我這樣做時,更改監(jiān)視器(“重新加載源代碼”的“監(jiān)視代碼更改”部分)報告它已檢測到更改的文件:monitor (pid=26216): Starting change monitor.You have requested to collect static files at the destinationlocation as specified in your settings.This will overwrite existing files!Are you sure you want to do this?Type 'yes' to continue, or 'no' to cancel: monitor (pid=26216): Change detected to 'myproject/manage.py'.monitor (pid=26216): Triggering process restart.Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/envs/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line utility.execute() File "/envs/myproject/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/envs/myproject/local/lib/python2.7/site-packages/django/core/management/base.py", line 222, in run_from_argv self.execute(*args, **options.__dict__) File "/envs/myproject/local/lib/python2.7/site-packages/django/core/management/base.py", line 255, in execute output = self.handle(*args, **options) File "/envs/myproject/local/lib/python2.7/site-packages/django/core/management/base.py", line 385, in handle return self.handle_noargs(**options) File "/envs/myproject/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 160, in handle_noargs % (destination_display, clear_display))KeyboardInterrupt我運行“ touch myproject / wsgi.py”以“更新更改緩存”,然后再次運行collectstatic命令。這導(dǎo)致了同樣的錯誤。然后,我進入python控制臺并手動運行了監(jiān)視啟動命令:import myproject.monitormyproject.monitor.start(1)這沒什么區(qū)別。我還嘗試向監(jiān)視器添加條件,以便在檢查文件更改時它會忽略manage.py,但這給了我同樣的錯誤,因為myproject / __ init__.py是它報告為已更改的文件。有人知道是什么原因造成的嗎?
添加回答
舉報
0/150
提交
取消