Skip to content

Commit f4fe2f0

Browse files
chore: themes use set_value
1 parent 144c34a commit f4fe2f0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • pythoncms/modules/box__default/theme

pythoncms/modules/box__default/theme/view.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# from init import db
1616

1717
from modules.box__default.keyvalue.helpers import get_value
18+
from modules.box__default.keyvalue.helpers import set_value
1819

1920
# from shopyo.api.forms import flash_errors
2021

@@ -86,7 +87,7 @@ def index():
8687
@module_blueprint.route("/activate/front/<theme_name>")
8788
@login_required
8889
def activate_front_theme(theme_name):
89-
os.environ['ACTIVE_FRONT_THEME"'] = theme_name
90+
set_value('ACTIVE_FRONT_THEME', theme_name)
9091

9192
# with app.app_context():
9293

@@ -98,7 +99,7 @@ def activate_front_theme(theme_name):
9899
@module_blueprint.route("/activate/back/<theme_name>")
99100
@login_required
100101
def activate_back_theme(theme_name):
101-
os.environ['ACTIVE_BACK_THEME"'] = theme_name
102+
set_value('ACTIVE_BACK_THEME', theme_name)
102103

103104
# with app.app_context():
104105

0 commit comments

Comments
 (0)