From 381d8c28eff85e651e70dc30aebeda6845ed8ec2 Mon Sep 17 00:00:00 2001 From: Eric Lay Date: Wed, 27 Mar 2024 20:12:22 -0500 Subject: [PATCH] pop off old website_dir before setting one --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 8c53203..fc36899 100644 --- a/app.py +++ b/app.py @@ -16,6 +16,7 @@ WEBSITE_DIRS = [name for name in os.listdir(ROOT_DIR) if not name.startswith('.' # Site choosing logic website_dir = None def current_website_dir(): + session.pop('website_dir', None) if session['requests'] % 5 == 0: session['website_dir'] = str(ROOT_DIR+"/Marvel") elif session['requests'] % 6 == 0: @@ -46,4 +47,4 @@ def index(): return send_from_directory(session['website_dir'], 'index.html') if __name__ == "__main__": - app.run(debug=True) + app.run()