コード例 #1
0
ファイル: routes.py プロジェクト: svieira/Budget-Manager
from flask import Blueprint
from hip_pocket import Mapper

routes = Blueprint("data", __name__)
mapper = Mapper(routes,
                base_import_name="apps.data",
                methods=["GET", "POST"])

mapper.add_url_rule("/add-tag-map",
                        "tag_mapper.add_tag_map")

mapper.add_url_rule("/import",
                        "load.provide_file")
mapper.add_url_rule("/import/<path:filename>",
                        "load.data_mapping")

mapper.add_url_rule("/search", "search.search")
mapper.add_url_rule("/search/<model>", "search.search")
コード例 #2
0
from flask import Blueprint
from hip_pocket import Mapper

routes = Blueprint("reports", __name__, url_prefix="/reports")
mapper = Mapper(routes, base_import_name="apps.reports")

mapper.add_url_rule("/expense-by-category",
                        "static_reports.expense_by_category")
mapper.add_url_rule("/transactions-with-tags",
                        "static_reports.transactions_with_tags")
コード例 #3
0
ファイル: routes.py プロジェクト: svieira/Budget-Manager
from flask import Blueprint
from hip_pocket import Mapper

routes = Blueprint("app", __name__)
mapper = Mapper(routes, base_import_name="apps")

mapper.add_url_rule("/", "index.index")
mapper.add_url_rule("/<table_name>", "index.view_table")