Moved the base account data from the "accounting.base_account.commands" module into the data directory as a CSV file, separating the code and the data. The locales are read from the CSV file instead of hard-coded in the code, so that the translations are not hard-coded to Mandarin.

This commit is contained in:
2023-02-08 10:25:29 +08:00
parent a839c5a41a
commit 2aacb67988
4 changed files with 548 additions and 669 deletions

@ -18,11 +18,15 @@
"""
import typing as t
from pathlib import Path
from flask import Flask, Blueprint
from accounting.utils.user import AbstractUserUtils
data_dir: Path = Path(__file__).parent / "data"
"""The data directory."""
def init_app(app: Flask, user_utils: AbstractUserUtils,
url_prefix: str = "/accounting",