Added the option management, and moved the configuration of the default currency, the default account for the income and expenses log, and the recurring expenses and incomes to the options.

This commit is contained in:
2023-03-22 15:34:28 +08:00
parent fa3cdace7f
commit 761d5a5824
24 changed files with 1919 additions and 79 deletions

View File

@ -17,9 +17,8 @@
"""The template globals.
"""
from flask import current_app
from accounting.models import Currency
from accounting.option.options import options
def currency_options() -> str:
@ -35,4 +34,4 @@ def default_currency_code() -> str:
:return: The default currency code.
"""
return current_app.config.get("ACCOUNTING_DEFAULT_CURRENCY", "USD")
return options.default_currency