77from flask import render_template
88from flask import url_for
99from flask_login import login_required
10- from modules .box__default .settings .helpers import get_setting
11- from modules .box__default .settings .helpers import set_setting
1210from shopyo .api .file import get_folders
1311
1412# from flask import flash
@@ -67,8 +65,8 @@ def index():
6765 with open (info_path ) as f :
6866 all_back_info [folder ] = json .load (f )
6967
70- active_front_theme = get_setting ( " ACTIVE_FRONT_THEME" )
71- active_back_theme = get_setting ( " ACTIVE_BACK_THEME" )
68+ active_front_theme = os . environ . get ( ' ACTIVE_FRONT_THEME' , 'editorial' )
69+ active_back_theme = os . environ . get ( ' ACTIVE_BACK_THEME' , 'SNEAT' )
7270
7371 context .update (
7472 {
@@ -88,7 +86,7 @@ def index():
8886@module_blueprint .route ("/activate/front/<theme_name>" )
8987@login_required
9088def activate_front_theme (theme_name ):
91- set_setting ( " ACTIVE_FRONT_THEME", theme_name )
89+ os . environ [ ' ACTIVE_FRONT_THEME"' ] = theme_name
9290
9391 # with app.app_context():
9492
@@ -100,7 +98,7 @@ def activate_front_theme(theme_name):
10098@module_blueprint .route ("/activate/back/<theme_name>" )
10199@login_required
102100def activate_back_theme (theme_name ):
103- set_setting ( " ACTIVE_BACK_THEME", theme_name )
101+ os . environ [ ' ACTIVE_BACK_THEME"' ] = theme_name
104102
105103 # with app.app_context():
106104
0 commit comments