Only use relative imports for functions in the same package.

This commit is contained in:
Patrick Jentsch 2019-11-05 16:22:36 +01:00
parent eb85869158
commit 4bcd97c003
5 changed files with 12 additions and 12 deletions

View File

@ -1,8 +1,8 @@
from app.models import Role, User
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from wtforms import (BooleanField, SelectField, StringField, SubmitField, from wtforms import (BooleanField, SelectField, StringField, SubmitField,
ValidationError) ValidationError)
from wtforms.validators import DataRequired, Email, Length, Regexp from wtforms.validators import DataRequired, Email, Length, Regexp
from ..models import Role, User
class EditProfileAdminForm(FlaskForm): class EditProfileAdminForm(FlaskForm):

View File

@ -1,12 +1,12 @@
from app import db
from app.decorators import admin_required
from app.models import Role, User
from app.tables import AdminUserItem, AdminUserTable
from app.utils import background_delete_user from app.utils import background_delete_user
from flask import current_app, flash, redirect, render_template, url_for from flask import current_app, flash, redirect, render_template, url_for
from flask_login import login_required from flask_login import login_required
from . import admin from . import admin
from .forms import EditProfileAdminForm from .forms import EditProfileAdminForm
from .. import db
from ..decorators import admin_required
from ..models import Role, User
from ..tables import AdminUserTable, AdminUserItem
import threading import threading

View File

@ -1,8 +1,8 @@
from app.models import User
from flask_wtf import FlaskForm from flask_wtf import FlaskForm
from wtforms import (BooleanField, PasswordField, StringField, SubmitField, from wtforms import (BooleanField, PasswordField, StringField, SubmitField,
ValidationError) ValidationError)
from wtforms.validators import DataRequired, Email, EqualTo, Length, Regexp from wtforms.validators import DataRequired, Email, EqualTo, Length, Regexp
from ..models import User
class LoginForm(FlaskForm): class LoginForm(FlaskForm):

View File

@ -1,11 +1,11 @@
from app import db
from app.email import send_email
from app.models import User
from flask import flash, redirect, render_template, request, url_for from flask import flash, redirect, render_template, request, url_for
from flask_login import current_user, login_required, login_user, logout_user from flask_login import current_user, login_required, login_user, logout_user
from . import auth from . import auth
from .forms import (LoginForm, PasswordResetForm, PasswordResetRequestForm, from .forms import (LoginForm, PasswordResetForm, PasswordResetRequestForm,
RegistrationForm) RegistrationForm)
from .. import db
from ..email import send_email
from ..models import User
@auth.route('/login', methods=['GET', 'POST']) @auth.route('/login', methods=['GET', 'POST'])

View File

@ -1,13 +1,13 @@
from app import db
from app.models import Corpus, CorpusFile
from app.utils import background_prepare_corpus_file from app.utils import background_prepare_corpus_file
from flask import (abort, current_app, flash, redirect, request, from flask import (abort, current_app, flash, redirect, request,
render_template, url_for, send_from_directory) render_template, url_for, send_from_directory)
from flask_login import current_user, login_required from flask_login import current_user, login_required
from werkzeug.utils import secure_filename
from . import corpora from . import corpora
from .forms import (AddCorpusFileForm, AddCorpusForm, EditCorpusFileForm, from .forms import (AddCorpusFileForm, AddCorpusForm, EditCorpusFileForm,
QueryDownloadForm, QueryForm) QueryDownloadForm, QueryForm)
from .. import db
from ..models import Corpus, CorpusFile
from werkzeug.utils import secure_filename
import os import os
import threading import threading
import logging import logging