diff --git a/pricing/pricing.py b/pricing/pricing.py index dd3323c..d90f174 100644 --- a/pricing/pricing.py +++ b/pricing/pricing.py @@ -197,8 +197,8 @@ class PricingProgram: debug(f'id={ppid} pricing_program not found') r = recs[0] x = DictObject(** yaml.safe_load(r.pricing_spec)) - webpath = env.quote(write_pattern_xlsx(x)) - return env.entire_url(f'/idfile?path={webpath}') + fpath = write_pattern_xlsx(x) + return fpath @staticmethod def pp_db2app(pp): diff --git a/pricing/write_pattern.py b/pricing/write_pattern.py index 4786783..70b3743 100644 --- a/pricing/write_pattern.py +++ b/pricing/write_pattern.py @@ -37,8 +37,7 @@ def write_pattern_xlsx(fields: dict) -> str: fs = FileStorage() fp = fs._name2path(f'pricing_{getID}.xlsx') wb.save(fp) - webpath = fs.webpath(fp) - return webpath + return fp def create_options(ws, dcol, sheet, opt_id, options): r = 2 diff --git a/wwwroot/download_pricing_pattern.dspy b/wwwroot/download_pricing_pattern.dspy index 1fbd157..ac3b2db 100644 --- a/wwwroot/download_pricing_pattern.dspy +++ b/wwwroot/download_pricing_pattern.dspy @@ -1,3 +1,3 @@ debug(f'download_pricing_pattern.dspy{params_kw=}') url = await write_pricing_patten(request, params_kw.ppid) -await redirect(url) +return await file_response(request, fp)