régler les imports des fichiers après redistribution

This commit is contained in:
cedrick2711
2026-07-29 14:16:01 -04:00
parent b69eaabbba
commit fc1bdc57c4
13 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
)
+2 -2
View File
@@ -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()
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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
# =============================================================================
-37
View File
@@ -1,37 +0,0 @@
"""WSGI entry point for the Team Tryouts application.
This module provides the production WSGI server using Waitress (Windows).
Use this file to start the application in production instead of Flask's
built-in development server.
Usage:
python wsgi.py
Configuration via environment variables:
PORT: Port to listen on (default: 5000)
WAITRESS_THREADS: Number of worker threads (default: CPU*2+1)
"""
import os
import multiprocessing
from app.app import create_app
app = create_app()
if __name__ == '__main__':
from waitress import serve
port = int(os.getenv('PORT', 5000))
threads = int(os.getenv('WAITRESS_THREADS', multiprocessing.cpu_count() * 2 + 1))
host = os.getenv('HOST', '127.0.0.1') # Bind to localhost by default (Nginx reverse proxy)
print(f'Starting Waitress server on {host}:{port} with {threads} threads')
serve(
app,
host=host,
port=port,
threads=threads,
# Graceful shutdown settings
channel_timeout=30, # Seconds to wait for in-flight requests
cleanup_interval=30,
)