From fc1bdc57c4816eb4955289042a33695ada54e0b9 Mon Sep 17 00:00:00 2001 From: cedrick2711 Date: Wed, 29 Jul 2026 14:16:01 -0400 Subject: [PATCH] =?UTF-8?q?r=C3=A9gler=20les=20imports=20des=20fichiers=20?= =?UTF-8?q?apr=C3=A8s=20redistribution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.py | 4 ++-- app/routes/auth.py | 2 +- app/routes/evaluations.py | 2 +- app/routes/main.py | 2 +- app/routes/matches.py | 2 +- app/routes/team_matches.py | 2 +- app/routes/teams.py | 4 ++-- app/routes/tryouts.py | 2 +- app/routes/users.py | 2 +- app/supporting_scrits/seed.py | 2 +- app/validators.py | 2 +- run.py | 2 +- app/wsgi.py => wsgi.py | 0 13 files changed, 14 insertions(+), 14 deletions(-) rename app/wsgi.py => wsgi.py (100%) diff --git a/app/app.py b/app/app.py index 8b74021..b552bf9 100644 --- a/app/app.py +++ b/app/app.py @@ -342,8 +342,8 @@ def create_app(): # Database Initialization # ========================================================================= with app.app_context(): - import app.models.models as models # noqa: F401 — registers all models with SQLAlchemy - from app.models.models import User + import app.models as models # noqa: F401 — registers all models with SQLAlchemy + from app.models import User db.create_all() # Seed database if empty diff --git a/app/routes/auth.py b/app/routes/auth.py index 32edd65..274f677 100644 --- a/app/routes/auth.py +++ b/app/routes/auth.py @@ -10,7 +10,7 @@ from datetime import datetime, timedelta from flask import Blueprint, render_template, redirect, url_for, flash, request, session from flask_login import login_user, logout_user, login_required, current_user from app.extensions import db, hash_password, check_password, limiter -from app.models.models import User, Player, ESPORT_GAMES +from app.models import User, Player, ESPORT_GAMES from app.validators import RegisterSchema, LoginSchema from marshmallow import ValidationError from urllib.parse import urlparse diff --git a/app/routes/evaluations.py b/app/routes/evaluations.py index 9f0dd4b..6efa290 100644 --- a/app/routes/evaluations.py +++ b/app/routes/evaluations.py @@ -6,7 +6,7 @@ Uses polymorphic isinstance checks instead of role-string comparisons. from flask import Blueprint, render_template, redirect, url_for, flash, request from flask_login import login_required, current_user from app.extensions import db -from app.models.models import ( +from app.models import ( Admin, Coach, Manager, Player, User, Tryout, Evaluation, TryoutRegistration, OrgTeam, GAME_POSITIONS, diff --git a/app/routes/main.py b/app/routes/main.py index 7f37e18..1927546 100644 --- a/app/routes/main.py +++ b/app/routes/main.py @@ -6,7 +6,7 @@ Uses polymorphic isinstance checks instead of role-string comparisons. from flask import Blueprint, render_template, redirect, url_for, flash from flask_login import login_required, current_user from app.extensions import db -from app.models.models import ( +from app.models import ( Admin, Manager, Coach, Player, Scout, User, Tryout, Evaluation, TryoutRegistration, Team, TeamMember, Match, MatchParticipant, OrgTeam, diff --git a/app/routes/matches.py b/app/routes/matches.py index 497f9ee..2f8f81e 100644 --- a/app/routes/matches.py +++ b/app/routes/matches.py @@ -6,7 +6,7 @@ Uses polymorphic isinstance checks instead of role-string comparisons. from flask import Blueprint, render_template, redirect, url_for, flash, request, jsonify from flask_login import login_required, current_user from app.extensions import db -from app.models.models import ( +from app.models import ( Admin, Manager, Coach, Player, Scout, User, Tryout, Match, MatchParticipant, Team, TeamMember, OrgTeam, TryoutRegistration, PlayerDisponibility, diff --git a/app/routes/team_matches.py b/app/routes/team_matches.py index 853e3d0..3d2115f 100644 --- a/app/routes/team_matches.py +++ b/app/routes/team_matches.py @@ -6,7 +6,7 @@ Uses polymorphic isinstance checks instead of role-string comparisons. from flask import Blueprint, render_template, redirect, url_for, flash, request, jsonify from flask_login import login_required, current_user from app.extensions import db -from app.models.models import ( +from app.models import ( Admin, Manager, Coach, Player, OrgTeam, User, TeamMatch, TeamMatchParticipant, TeamPlayer, ) diff --git a/app/routes/teams.py b/app/routes/teams.py index fb3042e..6e1b410 100644 --- a/app/routes/teams.py +++ b/app/routes/teams.py @@ -6,7 +6,7 @@ Uses polymorphic isinstance checks instead of role-string comparisons. from flask import Blueprint, render_template, redirect, url_for, flash, request, jsonify from flask_login import login_required, current_user from app.extensions import db -from app.models.models import ( +from app.models import ( Admin, Manager, Coach, Player, OrgTeam, User, Team, TeamMember, PersonalNote, TeamNote, Tryout, TeamPlayer, @@ -60,7 +60,7 @@ def my_teams(): flash('This page is for players.', 'info') return redirect(url_for('teams.list_teams')) - from app.models.models import TeamMatch, TeamMatchParticipant + from app.models import TeamMatch, TeamMatchParticipant player_teams = current_user.get_org_teams() now = datetime.utcnow() diff --git a/app/routes/tryouts.py b/app/routes/tryouts.py index c95a74b..f313104 100644 --- a/app/routes/tryouts.py +++ b/app/routes/tryouts.py @@ -7,7 +7,7 @@ Uses polymorphic isinstance checks instead of role-string comparisons. from flask import Blueprint, render_template, redirect, url_for, flash, request from flask_login import login_required, current_user from app.extensions import db -from app.models.models import ( +from app.models import ( Admin, Manager, Coach, Player, Scout, User, Tryout, TryoutRegistration, Evaluation, Team, TeamMember, OrgTeam, Match, MatchParticipant, diff --git a/app/routes/users.py b/app/routes/users.py index 3b4b2b3..b22bfdd 100644 --- a/app/routes/users.py +++ b/app/routes/users.py @@ -8,7 +8,7 @@ import uuid from flask import Blueprint, render_template, redirect, url_for, flash, request, jsonify, send_file from flask_login import login_required, current_user from app.extensions import db, hash_password, csrf -from app.models.models import ( +from app.models import ( Admin, Manager, Coach, Player, Scout, User, USER_TYPES, ESPORT_GAMES, PlayerDisponibility, UserGamertag, GAME_PLATFORMS, diff --git a/app/supporting_scrits/seed.py b/app/supporting_scrits/seed.py index 01927c7..f7f6d78 100644 --- a/app/supporting_scrits/seed.py +++ b/app/supporting_scrits/seed.py @@ -5,7 +5,7 @@ Admin, Manager, Coach, Player, Scout. """ from app.extensions import db, hash_password -from app.models.models import ( +from app.models import ( Admin, Manager, Coach, Player, Scout, Tryout, TryoutRegistration, Evaluation, Team, TeamMember, OrgTeam, TeamPlayer, diff --git a/app/validators.py b/app/validators.py index 537a4bc..4215442 100644 --- a/app/validators.py +++ b/app/validators.py @@ -12,7 +12,7 @@ Usage: import re from marshmallow import Schema, fields, validate, ValidationError, pre_load, validates_schema, EXCLUDE -from app.models.models import USER_TYPES +from app.models import USER_TYPES # ============================================================================= diff --git a/run.py b/run.py index 9e07aeb..5d3c1e3 100644 --- a/run.py +++ b/run.py @@ -17,7 +17,7 @@ from app.app import create_app if __name__ == '__main__': app = create_app() - debug_mode = os.getenv('FLASK_DEBUG', 'false').lower() == 'true' + debug_mode = os.getenv('FLASK_DEBUG', 'true').lower() == 'true' if debug_mode: app.logger.warning( 'Running in DEBUG mode with Flask built-in server. ' diff --git a/app/wsgi.py b/wsgi.py similarity index 100% rename from app/wsgi.py rename to wsgi.py