optimize import

This commit is contained in:
Son NK 2020-05-07 17:49:29 +02:00
parent fe1262686e
commit 84c529c867
7 changed files with 11 additions and 16 deletions

View File

@ -1,8 +1,7 @@
import json import json
import secrets import secrets
import webauthn
from app.config import RP_ID, URL
import webauthn
from flask import request, render_template, redirect, url_for, flash, session from flask import request, render_template, redirect, url_for, flash, session
from flask_login import login_user from flask_login import login_user
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
@ -10,9 +9,10 @@ from wtforms import HiddenField, validators
from app.auth.base import auth_bp from app.auth.base import auth_bp
from app.config import MFA_USER_ID from app.config import MFA_USER_ID
from app.config import RP_ID, URL
from app.extensions import db
from app.log import LOG from app.log import LOG
from app.models import User from app.models import User
from app.extensions import db
class FidoTokenForm(FlaskForm): class FidoTokenForm(FlaskForm):

View File

@ -2,9 +2,9 @@ import os
import random import random
import string import string
import subprocess import subprocess
from urllib.parse import urlparse
from dotenv import load_dotenv from dotenv import load_dotenv
from urllib.parse import urlparse
SHA1 = subprocess.getoutput("git rev-parse HEAD") SHA1 = subprocess.getoutput("git rev-parse HEAD")
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))

View File

@ -1,15 +1,14 @@
import uuid
import json import json
import secrets import secrets
import webauthn import uuid
from app.config import RP_ID, URL
from urllib.parse import urlparse
import webauthn
from flask import render_template, flash, redirect, url_for, session from flask import render_template, flash, redirect, url_for, session
from flask_login import login_required, current_user from flask_login import login_required, current_user
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from wtforms import HiddenField, validators from wtforms import HiddenField, validators
from app.config import RP_ID, URL
from app.dashboard.base import dashboard_bp from app.dashboard.base import dashboard_bp
from app.extensions import db from app.extensions import db
from app.log import LOG from app.log import LOG

View File

@ -16,8 +16,6 @@ from app.models import (
AliasGeneratorEnum, AliasGeneratorEnum,
User, User,
EmailLog, EmailLog,
CustomDomain,
Directory,
) )

View File

@ -4,7 +4,7 @@ from flask_login import login_required, current_user
from app.dashboard.base import dashboard_bp from app.dashboard.base import dashboard_bp
from app.extensions import db from app.extensions import db
from app.log import LOG from app.log import LOG
from app.models import Referral, User from app.models import Referral
from app.utils import random_string from app.utils import random_string

View File

@ -5,10 +5,10 @@ from flask import request, render_template, redirect, flash
from flask_login import current_user from flask_login import current_user
from itsdangerous import SignatureExpired from itsdangerous import SignatureExpired
from app.config import EMAIL_DOMAIN, ALIAS_DOMAINS, DISABLE_ALIAS_SUFFIX from app.config import EMAIL_DOMAIN
from app.dashboard.views.custom_alias import available_suffixes, signer
from app.email_utils import get_email_domain_part from app.email_utils import get_email_domain_part
from app.extensions import db from app.extensions import db
from app.dashboard.views.custom_alias import available_suffixes, signer
from app.jose_utils import make_id_token from app.jose_utils import make_id_token
from app.log import LOG from app.log import LOG
from app.models import ( from app.models import (
@ -30,7 +30,7 @@ from app.oauth_models import (
SUPPORTED_OPENID_FLOWS_STR, SUPPORTED_OPENID_FLOWS_STR,
response_types_to_str, response_types_to_str,
) )
from app.utils import random_string, encode_url, random_word from app.utils import random_string, encode_url
@oauth_bp.route("/authorize", methods=["GET", "POST"]) @oauth_bp.route("/authorize", methods=["GET", "POST"])

View File

@ -10,13 +10,11 @@ import collections
import phpserialize import phpserialize
import requests import requests
from Crypto.Hash import SHA1 from Crypto.Hash import SHA1
# Crypto can be found at https://pypi.org/project/pycryptodome/ # Crypto can be found at https://pypi.org/project/pycryptodome/
from Crypto.PublicKey import RSA from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5 from Crypto.Signature import PKCS1_v1_5
from app.config import PADDLE_PUBLIC_KEY_PATH, PADDLE_VENDOR_ID, PADDLE_AUTH_CODE from app.config import PADDLE_PUBLIC_KEY_PATH, PADDLE_VENDOR_ID, PADDLE_AUTH_CODE
# Your Paddle public key. # Your Paddle public key.
from app.log import LOG from app.log import LOG