diff --git a/app.py b/app.py index c8f688b..fba83ba 100644 --- a/app.py +++ b/app.py @@ -6,6 +6,7 @@ import traceback from services.sleeper_api import SleeperAPI from services.espn_api import ESPNAPI from config import Config +from faker import Faker # Force unbuffered output for Docker logs os.environ['PYTHONUNBUFFERED'] = '1' @@ -87,6 +88,7 @@ def index(): print("DEBUG: Index route accessed", flush=True) # Get the last used username from cookie last_username = request.cookies.get('last_username', '') + mySleeperUsername = Faker().user_name() print(f"DEBUG: Last username from cookie: '{last_username}'", flush=True) # Auto-redirect to dashboard if username cookie exists @@ -94,7 +96,7 @@ def index(): print(f"DEBUG: Auto-redirecting to dashboard for user: '{last_username}'", flush=True) return redirect(url_for('dashboard_current', username=last_username.strip())) - return render_template('index.html', last_username=last_username) + return render_template('index.html', last_username=last_username, mySleeperUsername=mySleeperUsername) @app.route('/dashboard') def dashboard_form(): diff --git a/requirements.txt b/requirements.txt index fa08585..f132b73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Flask==2.3.3 requests==2.31.0 python-dateutil==2.8.2 +Faker==37.12.0 diff --git a/templates/index.html b/templates/index.html index 05e7314..4872fec 100644 --- a/templates/index.html +++ b/templates/index.html @@ -18,7 +18,7 @@
-

Example: mySleeperUsername

+

Example: {{ mySleeperUsername }}