MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / create_project

Method create_project

class/projectModel/javaModel.py:2897–2929  ·  view source on GitHub ↗

@name 创建项目 @author lkq<2021-08-27> @param project_type 项目类型 1 内置 2 独立 3 Spring_boot 项目 @return string

(self, get)

Source from the content-addressed store, hash-verified

2895 return public.returnMsg(True, '开启外网映射成功')
2896
2897 def create_project(self, get):
2898 ''&#x27;
2899 @name 创建项目
2900 @author lkq<2021-08-27>
2901 @param project_type 项目类型 1 内置 2 独立 3 Spring_boot 项目
2902 @return string
2903 ''&#x27;
2904 try:
2905 project_type = int(get.project_type)
2906 except:
2907 return public.returnMsg(False, '项目类型参数错误')
2908 if project_type == 1:
2909 # 检查Nginx/Apache 配置文件是否OK
2910 isError = public.checkWebConfig()
2911 if isError != True:
2912 return public.returnMsg(
2913 False, 'WEB服务器配置配置文件错误ERROR:<br><font style="color:red;">' + isError.replace(
2914 "\n", '<br>'
2915 ) + '</font>'
2916 )
2917 return self.create_internal_project(get)
2918 elif project_type == 2:
2919 # 检查Nginx/Apache 配置文件是否OK
2920 isError = public.checkWebConfig()
2921 if isError != True:
2922 return public.returnMsg(
2923 False, 'WEB服务器配置配置文件错误ERROR:<br><font style="color:red;">' + isError.replace(
2924 "\n", '<br>'
2925 ) + '</font>'
2926 )
2927 return self.create_independent_project(get)
2928 elif project_type == 3:
2929 return self.create_spring_boot_project(get)
2930
2931 def create_internal_project(self, get):
2932 ''&#x27;

Callers

nothing calls this directly

Calls 5

returnMsgMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected