Replace absolute imports with relative imports
This commit is contained in:
@@ -21,10 +21,9 @@ import csv
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from accounting import data_dir
|
||||
from accounting import db
|
||||
from accounting.models import BaseAccount, BaseAccountL10n
|
||||
from accounting.utils.title_case import title_case
|
||||
from .. import db, data_dir
|
||||
from ..models import BaseAccount, BaseAccountL10n
|
||||
from ..utils.title_case import title_case
|
||||
|
||||
|
||||
def init_base_accounts_command() -> None:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# The Mia! Accounting Project.
|
||||
# Author: imacat@mail.imacat.idv.tw (imacat), 2023/2/1
|
||||
|
||||
# Copyright (c) 2023 imacat.
|
||||
# Copyright (c) 2023-2026 imacat.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -20,8 +20,8 @@
|
||||
from flask import abort
|
||||
from werkzeug.routing import BaseConverter
|
||||
|
||||
from accounting import db
|
||||
from accounting.models import BaseAccount
|
||||
from .. import db
|
||||
from ..models import BaseAccount
|
||||
|
||||
|
||||
class BaseAccountConverter(BaseConverter):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# The Mia! Accounting Project.
|
||||
# Author: imacat@mail.imacat.idv.tw (imacat), 2023/1/26
|
||||
|
||||
# Copyright (c) 2023 imacat.
|
||||
# Copyright (c) 2023-2026 imacat.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -20,8 +20,8 @@
|
||||
import sqlalchemy as sa
|
||||
from flask import request
|
||||
|
||||
from accounting.models import BaseAccount, BaseAccountL10n
|
||||
from accounting.utils.query import parse_query_keywords
|
||||
from ..models import BaseAccount, BaseAccountL10n
|
||||
from ..utils.query import parse_query_keywords
|
||||
|
||||
|
||||
def get_base_account_query() -> list[BaseAccount]:
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
"""
|
||||
from flask import Blueprint, render_template
|
||||
|
||||
from accounting.models import BaseAccount
|
||||
from accounting.utils.pagination import Pagination
|
||||
from accounting.utils.permission import has_permission, can_view
|
||||
from .queries import get_base_account_query
|
||||
from ..models import BaseAccount
|
||||
from ..utils.pagination import Pagination
|
||||
from ..utils.permission import has_permission, can_view
|
||||
|
||||
bp: Blueprint = Blueprint("base-account", __name__)
|
||||
"""The view blueprint for the base account management."""
|
||||
|
||||
Reference in New Issue
Block a user