from beancount.utils.text_utils import replace_numbers from beancount.core.data import Document from beancount.core.account import ACCOUNT_RE from fava import template_filters, LANGUAGES from fava.core import FavaLedger from fava.core.charts import FavaJSONEncoder from fava.core.helpers import FavaAPIException from fava.help import HELP_PAGES from fava.json_api import json_api from fava.serialisation import serialise from fava.util import slugify, resource_path, setup_logging, send_file_inline from fava.util.date import Interval from fava.util.excel import HAVE_EXCEL setup_logging() app = Flask( # pylint: disable=invalid-name __name__, template_folder=resource_path("templates"), static_folder=resource_path("static"), ) app.register_blueprint(json_api, url_prefix="/<bfile>/api") app.json_encoder = FavaJSONEncoder app.jinja_options["extensions"].append("jinja2.ext.do") app.jinja_env.trim_blocks = True app.jinja_env.lstrip_blocks = True app.config["HAVE_EXCEL"] = HAVE_EXCEL app.config["HELP_PAGES"] = HELP_PAGES app.config["ACCOUNT_RE"] = ACCOUNT_RE
from beancount.core.data import Document from beancount.core.account import ACCOUNT_RE from fava import template_filters from fava.core import FavaLedger from fava.core.charts import FavaJSONEncoder from fava.core.helpers import FavaAPIException from fava.help import HELP_PAGES from fava.json_api import json_api from fava.serialisation import serialise from fava.util import slugify, resource_path, setup_logging, send_file_inline from fava.util.date import Interval from fava.util.excel import HAVE_EXCEL setup_logging() app = Flask( # pylint: disable=invalid-name __name__, template_folder=resource_path('templates'), static_folder=resource_path('static')) app.register_blueprint(json_api, url_prefix='/<bfile>/api') app.json_encoder = FavaJSONEncoder app.jinja_options['extensions'].append('jinja2.ext.do') app.jinja_env.trim_blocks = True app.jinja_env.lstrip_blocks = True app.config['HAVE_EXCEL'] = HAVE_EXCEL app.config['HELP_PAGES'] = HELP_PAGES app.config['ACCOUNT_RE'] = ACCOUNT_RE