增加查看Gunicorn的日志的按钮和功能
This commit is contained in:
@@ -105,14 +105,15 @@ class DjangoTab(QWidget):
|
||||
self.load_django_path()
|
||||
|
||||
def load_django_path(self):
|
||||
"""从当前服务器配置加载Django路径"""
|
||||
"""从config.json加载Django路径"""
|
||||
try:
|
||||
if self.parent and hasattr(self.parent, 'get_current_config'):
|
||||
config = self.parent.get_current_config()
|
||||
if config:
|
||||
django_path = config.get('django_path', '')
|
||||
# 使用remote_directory而不是django_path
|
||||
django_path = config.get('remote_directory', '')
|
||||
self.django_path_input.setText(django_path)
|
||||
logger.info(f"从当前服务器配置加载django路径: {django_path}")
|
||||
logger.info(f"从当前服务器配置加载Django路径: {django_path}")
|
||||
else:
|
||||
logger.warning("未找到当前服务器配置")
|
||||
else:
|
||||
@@ -123,11 +124,12 @@ class DjangoTab(QWidget):
|
||||
|
||||
if config and 'servers' in config and len(config['servers']) > 0:
|
||||
server_config = config['servers'][0]
|
||||
django_path = server_config.get('django_path', '')
|
||||
# 使用remote_directory
|
||||
django_path = server_config.get('remote_directory', '')
|
||||
self.django_path_input.setText(django_path)
|
||||
logger.info(f"从配置文件加载django路径: {django_path}")
|
||||
logger.info(f"从配置文件加载Django路径: {django_path}")
|
||||
except Exception as e:
|
||||
logger.error(f"加载django路径失败: {str(e)}")
|
||||
logger.error(f"加载Django路径失败: {str(e)}")
|
||||
# 不显示警告,避免影响用户体验
|
||||
QMessageBox.warning(self, "警告", f"加载django路径失败: {str(e)}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user