This commit is contained in:
flaskfarm
2022-10-12 10:07:36 +09:00
parent 751adbbedc
commit 89fc6844ed
27 changed files with 153 additions and 2912 deletions

View File

@@ -43,7 +43,7 @@ class PluginManager:
for t in tmps:
if not t.startswith('_') and os.path.isdir(os.path.join(plugin_path, t)):
add_plugin_list.append(t)
cls.all_package_list[t] = {'pos':'normal', 'path':os.path.join(plugin_path, t)}
cls.all_package_list[t] = {'pos':'normal', 'path':os.path.join(plugin_path, t), 'loading':(F.config.get('plugin_loading_only_devpath', None) != True)}
plugins = plugins + add_plugin_list
except Exception as exception:
@@ -64,7 +64,7 @@ class PluginManager:
for t in tmps:
if not t.startswith('_') and os.path.isdir(os.path.join(plugin_path, t)):
add_plugin_list.append(t)
cls.all_package_list[t] = {'pos':'dev', 'path':os.path.join(plugin_path, t)}
cls.all_package_list[t] = {'pos':'dev', 'path':os.path.join(plugin_path, t), 'loading':True}
plugins = plugins + add_plugin_list
except Exception as exception:
F.logger.error('Exception:%s', exception)

View File

@@ -34,10 +34,15 @@ def global_ajax(sub):
elif sub == 'is_available_edit':
# globalEditBtn
try:
import flaskcode
from flaskcode.setup import P as PP
ret = {'ret':True, 'target':PP.ModelSetting.get('setting_open_target')}
return jsonify(ret)
if F.PluginManager.all_package_list['flaskcode']['loading']:
PP = F.PluginManager.all_package_list['flaskcode']['P']
#import flaskcode
#from flaskcode.setup import P as PP
ret = {'ret':True, 'target':PP.ModelSetting.get('setting_open_target')}
return jsonify(ret)
else:
return jsonify({'ret':False})
except:
return jsonify({'ret':False})
elif sub == 'command_modal_hide':

View File

@@ -9,13 +9,6 @@
{% endblock %}
<meta name="google" value="notranslate">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
<!--
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
-->
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.ico') }}">
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">