API - refactor imports
This commit is contained in:
@ -3,6 +3,11 @@ import os
|
||||
from typing import Dict, Tuple, Union
|
||||
|
||||
import jwt
|
||||
from flask import Blueprint, current_app, request
|
||||
from sqlalchemy import exc, or_
|
||||
from werkzeug.exceptions import RequestEntityTooLarge
|
||||
from werkzeug.utils import secure_filename
|
||||
|
||||
from fittrackee import appLog, bcrypt, db
|
||||
from fittrackee.responses import (
|
||||
ForbiddenErrorResponse,
|
||||
@ -13,12 +18,8 @@ from fittrackee.responses import (
|
||||
handle_error_and_return_response,
|
||||
)
|
||||
from fittrackee.tasks import reset_password_email
|
||||
from flask import Blueprint, current_app, request
|
||||
from sqlalchemy import exc, or_
|
||||
from werkzeug.exceptions import RequestEntityTooLarge
|
||||
from werkzeug.utils import secure_filename
|
||||
from fittrackee.workouts.utils_files import get_absolute_file_path
|
||||
|
||||
from ..workouts.utils_files import get_absolute_file_path
|
||||
from .decorators import authenticate
|
||||
from .models import User
|
||||
from .utils import (
|
||||
|
@ -1,9 +1,10 @@
|
||||
from functools import wraps
|
||||
from typing import Any, Callable, Union
|
||||
|
||||
from fittrackee.responses import HttpResponse
|
||||
from flask import request
|
||||
|
||||
from fittrackee.responses import HttpResponse
|
||||
|
||||
from .utils import verify_user
|
||||
|
||||
|
||||
|
@ -2,14 +2,15 @@ from datetime import datetime
|
||||
from typing import Dict, Optional, Union
|
||||
|
||||
import jwt
|
||||
from fittrackee import bcrypt, db
|
||||
from flask import current_app
|
||||
from sqlalchemy import func
|
||||
from sqlalchemy.ext.declarative import DeclarativeMeta
|
||||
from sqlalchemy.ext.hybrid import hybrid_property
|
||||
from sqlalchemy.sql.expression import select
|
||||
|
||||
from ..workouts.models import Workout
|
||||
from fittrackee import bcrypt, db
|
||||
from fittrackee.workouts.models import Workout
|
||||
|
||||
from .utils_token import decode_user_token, get_user_token
|
||||
|
||||
BaseModel: DeclarativeMeta = db.Model
|
||||
|
@ -2,6 +2,9 @@ import os
|
||||
import shutil
|
||||
from typing import Any, Dict, Tuple, Union
|
||||
|
||||
from flask import Blueprint, request, send_file
|
||||
from sqlalchemy import exc
|
||||
|
||||
from fittrackee import db
|
||||
from fittrackee.responses import (
|
||||
ForbiddenErrorResponse,
|
||||
@ -11,10 +14,8 @@ from fittrackee.responses import (
|
||||
UserNotFoundErrorResponse,
|
||||
handle_error_and_return_response,
|
||||
)
|
||||
from flask import Blueprint, request, send_file
|
||||
from sqlalchemy import exc
|
||||
from fittrackee.workouts.utils_files import get_absolute_file_path
|
||||
|
||||
from ..workouts.utils_files import get_absolute_file_path
|
||||
from .decorators import authenticate, authenticate_as_admin
|
||||
from .models import User, Workout
|
||||
|
||||
|
@ -3,6 +3,8 @@ from datetime import timedelta
|
||||
from typing import Optional, Tuple, Union
|
||||
|
||||
import humanize
|
||||
from flask import Request, current_app
|
||||
|
||||
from fittrackee.responses import (
|
||||
ForbiddenErrorResponse,
|
||||
HttpResponse,
|
||||
@ -10,7 +12,6 @@ from fittrackee.responses import (
|
||||
PayloadTooLargeErrorResponse,
|
||||
UnauthorizedErrorResponse,
|
||||
)
|
||||
from flask import Request, current_app
|
||||
|
||||
from .models import User
|
||||
|
||||
|
Reference in New Issue
Block a user