修改Gunicorn的测试命令,调试中,未完成

This commit is contained in:
2025-08-29 22:29:38 +08:00
parent c59ba98e8c
commit 0a673cf2bb
9 changed files with 715 additions and 37 deletions

View File

@@ -133,6 +133,18 @@ class DjangoTab(QWidget):
# 不显示警告,避免影响用户体验
QMessageBox.warning(self, "警告", f"加载django路径失败: {str(e)}")
def get_password(self):
"""从父类获取密码"""
if hasattr(self.parent, 'password_input'):
password = self.parent.password_input.text()
if not password:
QMessageBox.warning(self, "警告", "请输入服务器密码")
return None
return password
else:
QMessageBox.warning(self, "警告", "无法获取服务器密码")
return None
def check_ssh_connection(self):
if not self.parent or not self.parent.ssh_client:
QMessageBox.warning(self, "警告", "请先连接服务器")
@@ -143,12 +155,17 @@ class DjangoTab(QWidget):
if not self.check_ssh_connection():
return
# 获取密码
password = self.get_password()
if password is None:
return
self.output_text.append("正在安装Django...")
self.install_django_btn.setEnabled(False)
self.progress_bar.setVisible(True)
self.progress_bar.setValue(0)
self.django_install_thread = DjangoInstallThread(self.parent.ssh_client)
self.django_install_thread = DjangoInstallThread(self.parent.ssh_client, password)
self.django_install_thread.progress_updated.connect(self.update_progress)
self.django_install_thread.result_ready.connect(self.on_install_django_result)
self.django_install_thread.start()