From 76988d5231bd0f22df10f76022a503e7ec937ec8 Mon Sep 17 00:00:00 2001 From: MohmdFo Date: Wed, 16 Oct 2024 13:17:22 +0330 Subject: [PATCH] fix(template-discovery): resolve issue with template discovery during package build and publishing - Updated template paths to ensure proper discovery by renaming invoice and receipt templates: - invoice1.jinja2 -> default_invoices/quotation_1.jinja2 - invoice2.jinja2 -> default_invoices/quotation_2.jinja2 - invoice3.jinja2 -> default_invoices/quotation_3.jinja2 - invoice4.jinja2 -> default_invoices/quotation_4.jinja2 - receipt1.jinja2 -> default_invoices/receipt1.jinja2 - receipt2.jinja2 -> default_invoices/receipt2.jinja2 - receipt3.jinja2 -> default_invoices/receipt3.jinja2 - Fixed issues in discovery process within `discovery.py` and `invoice_create.py`. - Adjusted helper functions in `funcs.py` to support the new template structure. - Modified tests in `test_helpers.py` to account for the updated paths. - Updated development and main requirements to reflect the new changes. This fix ensures proper template discovery when building and publishing the package. --- pyproject.toml | 2 +- requirements/requirements-dev.txt | 83 ++-- requirements/requirements.txt | 389 ++---------------- sage_invoice/helpers/funcs.py | 37 +- sage_invoice/service/discovery.py | 93 +++-- sage_invoice/service/invoice_create.py | 2 +- .../quotation_1.jinja2} | 0 .../quotation_2.jinja2} | 0 .../quotation_3.jinja2} | 0 .../quotation_4.jinja2} | 0 .../receipt1.jinja2 | 0 .../receipt2.jinja2 | 0 .../receipt3.jinja2 | 0 sage_invoice/tests/test_helpers.py | 4 +- 14 files changed, 135 insertions(+), 475 deletions(-) rename sage_invoice/templates/{sage_invoice/invoice1.jinja2 => default_invoices/quotation_1.jinja2} (100%) rename sage_invoice/templates/{sage_invoice/invoice2.jinja2 => default_invoices/quotation_2.jinja2} (100%) rename sage_invoice/templates/{sage_invoice/invoice3.jinja2 => default_invoices/quotation_3.jinja2} (100%) rename sage_invoice/templates/{sage_invoice/invoice4.jinja2 => default_invoices/quotation_4.jinja2} (100%) rename sage_invoice/templates/{sage_invoice => default_invoices}/receipt1.jinja2 (100%) rename sage_invoice/templates/{sage_invoice => default_invoices}/receipt2.jinja2 (100%) rename sage_invoice/templates/{sage_invoice => default_invoices}/receipt3.jinja2 (100%) diff --git a/pyproject.toml b/pyproject.toml index dba175b..9c011f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = [ "poetry-core" ] [tool.poetry] name = "django-sage-invoice" -version = "0.1.2" +version = "0.1.3" description = "A project for invoice generation and NFC integration." authors = [ "Radin Ghahremani ", "Sepehr Akbarzadeh " ] keywords = [ "django", "invoice", "sageteam", "django-packages" ] diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 003a185..42d535d 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -1,47 +1,48 @@ -alabaster==0.7.13 ; python_version >= "3.9" and python_version < "4.0" -argcomplete==3.5.0 ; python_version >= "3.9" and python_version < "4.0" +alabaster==0.7.16 ; python_version >= "3.9" and python_version < "4.0" +argcomplete==3.5.1 ; python_version >= "3.9" and python_version < "4.0" asgiref==3.8.1 ; python_version >= "3.9" and python_version < "4.0" -astroid==3.2.4 ; python_version >= "3.9" and python_version < "4.0" +astroid==3.3.5 ; python_version >= "3.9" and python_version < "4.0" babel==2.16.0 ; python_version >= "3.9" and python_version < "4.0" -bandit[toml]==1.7.9 ; python_version >= "3.9" and python_version < "4.0" -black==24.8.0 ; python_version >= "3.9" and python_version < "4.0" +bandit[toml]==1.7.10 ; python_version >= "3.9" and python_version < "4.0" +black==24.10.0 ; python_version >= "3.9" and python_version < "4.0" cachetools==5.5.0 ; python_version >= "3.9" and python_version < "4.0" certifi==2024.8.30 ; python_version >= "3.9" and python_version < "4.0" -cffi==1.17.0 ; python_version >= "3.9" and python_version < "4.0" and platform_python_implementation != "PyPy" +cffi==1.17.1 ; python_version >= "3.9" and python_version < "4.0" and platform_python_implementation != "PyPy" cfgv==3.4.0 ; python_version >= "3.9" and python_version < "4.0" chardet==5.2.0 ; python_version >= "3.9" and python_version < "4.0" charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "4.0" click==8.1.7 ; python_version >= "3.9" and python_version < "4.0" colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0" -commitizen==3.29.0 ; python_version >= "3.9" and python_version < "4.0" +commitizen==3.29.1 ; python_version >= "3.9" and python_version < "4.0" coverage[toml]==7.6.1 ; python_version >= "3.9" and python_version < "4.0" -cryptography==43.0.0 ; python_version >= "3.9" and python_version < "4.0" +cryptography==43.0.1 ; python_version >= "3.9" and python_version < "4.0" decli==0.6.2 ; python_version >= "3.9" and python_version < "4.0" diff-match-patch==20230430 ; python_version >= "3.9" and python_version < "4.0" -dill==0.3.8 ; python_version >= "3.9" and python_version < "4.0" +dill==0.3.9 ; python_version >= "3.9" and python_version < "4.0" distlib==0.3.8 ; python_version >= "3.9" and python_version < "4.0" django-debug-toolbar==4.4.6 ; python_version >= "3.9" and python_version < "4.0" django-import-export==4.1.1 ; python_version >= "3.9" and python_version < "4.0" -django-sage-tools==0.2.2 ; python_version >= "3.9" and python_version < "4.0" -django-stubs-ext==5.0.4 ; python_version >= "3.9" and python_version < "4.0" -django-stubs==5.0.4 ; python_version >= "3.9" and python_version < "4.0" -django==4.2.15 ; python_version >= "3.9" and python_version < "3.10" -django==5.1 ; python_version >= "3.10" and python_version < "4.0" +django-jsonform==2.23.1 ; python_version >= "3.9" and python_version < "4.0" +django-sage-tools==0.3.5 ; python_version >= "3.9" and python_version < "4.0" +django-stubs-ext==5.1.0 ; python_version >= "3.9" and python_version < "4.0" +django-stubs==5.1.0 ; python_version >= "3.9" and python_version < "4.0" +django==4.2.16 ; python_version >= "3.9" and python_version < "3.10" +django==5.1.2 ; python_version >= "3.10" and python_version < "4.0" docformatter==1.7.5 ; python_version >= "3.9" and python_version < "4.0" -docutils==0.19 ; python_version >= "3.9" and python_version < "4.0" +docutils==0.20.1 ; python_version >= "3.9" and python_version < "4.0" exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11" factory-boy==3.3.1 ; python_version >= "3.9" and python_version < "4.0" -faker==28.1.0 ; python_version >= "3.9" and python_version < "4.0" -filelock==3.15.4 ; python_version >= "3.9" and python_version < "4.0" -identify==2.6.0 ; python_version >= "3.9" and python_version < "4.0" -idna==3.8 ; python_version >= "3.9" and python_version < "4.0" +faker==30.3.0 ; python_version >= "3.9" and python_version < "4.0" +filelock==3.16.1 ; python_version >= "3.9" and python_version < "4.0" +identify==2.6.1 ; python_version >= "3.9" and python_version < "4.0" +idna==3.10 ; python_version >= "3.9" and python_version < "4.0" imagesize==1.4.1 ; python_version >= "3.9" and python_version < "4.0" -importlib-metadata==8.4.0 ; python_version >= "3.9" and python_version < "4.0" +importlib-metadata==8.5.0 ; python_version >= "3.9" and python_version < "4.0" iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "4.0" isort==5.13.2 ; python_version >= "3.9" and python_version < "4.0" jinja2==3.1.4 ; python_version >= "3.9" and python_version < "4.0" markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "4.0" -markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "4.0" +markupsafe==3.0.0 ; python_version >= "3.9" and python_version < "4.0" mccabe==0.7.0 ; python_version >= "3.9" and python_version < "4.0" mdurl==0.1.2 ; python_version >= "3.9" and python_version < "4.0" mimesis==11.1.0 ; python_version >= "3.9" and python_version < "4.0" @@ -52,7 +53,7 @@ packaging==24.1 ; python_version >= "3.9" and python_version < "4.0" pathspec==0.12.1 ; python_version >= "3.9" and python_version < "4.0" pbr==6.1.0 ; python_version >= "3.9" and python_version < "4.0" pillow==10.4.0 ; python_version >= "3.9" and python_version < "4.0" -platformdirs==4.2.2 ; python_version >= "3.9" and python_version < "4.0" +platformdirs==4.3.6 ; python_version >= "3.9" and python_version < "4.0" pluggy==1.5.0 ; python_version >= "3.9" and python_version < "4.0" pre-commit==3.8.0 ; python_version >= "3.9" and python_version < "4.0" prompt-toolkit==3.0.36 ; python_version >= "3.9" and python_version < "4.0" @@ -62,42 +63,42 @@ pygal==3.0.5 ; python_version >= "3.9" and python_version < "4.0" pygments==2.18.0 ; python_version >= "3.9" and python_version < "4.0" pylint-django==2.5.5 ; python_version >= "3.9" and python_version < "4.0" pylint-plugin-utils==0.8.2 ; python_version >= "3.9" and python_version < "4.0" -pylint==3.2.7 ; python_version >= "3.9" and python_version < "4.0" -pyproject-api==1.7.1 ; python_version >= "3.9" and python_version < "4.0" +pylint==3.3.1 ; python_version >= "3.9" and python_version < "4.0" +pyproject-api==1.8.0 ; python_version >= "3.9" and python_version < "4.0" pytest-benchmark==4.0.0 ; python_version >= "3.9" and python_version < "4.0" pytest-cov==5.0.0 ; python_version >= "3.9" and python_version < "4.0" pytest-django==4.9.0 ; python_version >= "3.9" and python_version < "4.0" pytest-mock==3.14.0 ; python_version >= "3.9" and python_version < "4.0" -pytest==8.3.2 ; python_version >= "3.9" and python_version < "4.0" +pytest==8.3.3 ; python_version >= "3.9" and python_version < "4.0" python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_version < "4.0" pyyaml==6.0.2 ; python_version >= "3.9" and python_version < "4.0" questionary==2.0.1 ; python_version >= "3.9" and python_version < "4.0" requests==2.32.3 ; python_version >= "3.9" and python_version < "4.0" -rich==13.8.0 ; python_version >= "3.9" and python_version < "4.0" -ruff==0.6.3 ; python_version >= "3.9" and python_version < "4.0" +rich==13.9.2 ; python_version >= "3.9" and python_version < "4.0" +ruff==0.6.9 ; python_version >= "3.9" and python_version < "4.0" six==1.16.0 ; python_version >= "3.9" and python_version < "4.0" snowballstemmer==2.2.0 ; python_version >= "3.9" and python_version < "4.0" sphinx-rtd-theme==2.0.0 ; python_version >= "3.9" and python_version < "4.0" -sphinx==6.2.1 ; python_version >= "3.9" and python_version < "4.0" -sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.9" and python_version < "4.0" -sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.9" and python_version < "4.0" -sphinxcontrib-htmlhelp==2.0.1 ; python_version >= "3.9" and python_version < "4.0" +sphinx==7.4.7 ; python_version >= "3.9" and python_version < "4.0" +sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0" +sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0" +sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.9" and python_version < "4.0" sphinxcontrib-jquery==4.1 ; python_version >= "3.9" and python_version < "4.0" sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_version < "4.0" -sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.9" and python_version < "4.0" -sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.9" and python_version < "4.0" +sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0" +sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" and python_version < "4.0" sqlparse==0.5.1 ; python_version >= "3.9" and python_version < "4.0" stevedore==5.3.0 ; python_version >= "3.9" and python_version < "4.0" tablib==3.5.0 ; python_version >= "3.9" and python_version < "4.0" -termcolor==2.4.0 ; python_version >= "3.9" and python_version < "4.0" -tomli==2.0.1 ; python_full_version <= "3.11.0a6" and python_version >= "3.9" +termcolor==2.5.0 ; python_version >= "3.9" and python_version < "4.0" +tomli==2.0.2 ; python_full_version <= "3.11.0a6" and python_version >= "3.9" tomlkit==0.13.2 ; python_version >= "3.9" and python_version < "4.0" -tox==4.18.0 ; python_version >= "3.9" and python_version < "4.0" -types-pyyaml==6.0.12.20240808 ; python_version >= "3.9" and python_version < "4.0" +tox==4.21.2 ; python_version >= "3.9" and python_version < "4.0" +types-pyyaml==6.0.12.20240917 ; python_version >= "3.9" and python_version < "4.0" typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "4.0" -tzdata==2024.1 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32" +tzdata==2024.2 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32" untokenize==0.1.1 ; python_version >= "3.9" and python_version < "4.0" -urllib3==2.2.2 ; python_version >= "3.9" and python_version < "4.0" -virtualenv==20.26.3 ; python_version >= "3.9" and python_version < "4.0" +urllib3==2.2.3 ; python_version >= "3.9" and python_version < "4.0" +virtualenv==20.26.6 ; python_version >= "3.9" and python_version < "4.0" wcwidth==0.2.13 ; python_version >= "3.9" and python_version < "4.0" -zipp==3.20.1 ; python_version >= "3.9" and python_version < "4.0" +zipp==3.20.2 ; python_version >= "3.9" and python_version < "4.0" diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 2e8a770..ae1bf79 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,361 +1,28 @@ -asgiref==3.8.1 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47 \ - --hash=sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590 -bandit[toml]==1.7.9 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:52077cb339000f337fb25f7e045995c4ad01511e716e5daac37014b9752de8ec \ - --hash=sha256:7c395a436743018f7be0a4cbb0a4ea9b902b6d87264ddecf8cfdc73b4f78ff61 -cffi==1.17.0 ; python_version >= "3.9" and python_version < "4.0" and platform_python_implementation != "PyPy" \ - --hash=sha256:011aff3524d578a9412c8b3cfaa50f2c0bd78e03eb7af7aa5e0df59b158efb2f \ - --hash=sha256:0a048d4f6630113e54bb4b77e315e1ba32a5a31512c31a273807d0027a7e69ab \ - --hash=sha256:0bb15e7acf8ab35ca8b24b90af52c8b391690ef5c4aec3d31f38f0d37d2cc499 \ - --hash=sha256:0d46ee4764b88b91f16661a8befc6bfb24806d885e27436fdc292ed7e6f6d058 \ - --hash=sha256:0e60821d312f99d3e1569202518dddf10ae547e799d75aef3bca3a2d9e8ee693 \ - --hash=sha256:0fdacad9e0d9fc23e519efd5ea24a70348305e8d7d85ecbb1a5fa66dc834e7fb \ - --hash=sha256:14b9cbc8f7ac98a739558eb86fabc283d4d564dafed50216e7f7ee62d0d25377 \ - --hash=sha256:17c6d6d3260c7f2d94f657e6872591fe8733872a86ed1345bda872cfc8c74885 \ - --hash=sha256:1a2ddbac59dc3716bc79f27906c010406155031a1c801410f1bafff17ea304d2 \ - --hash=sha256:2404f3de742f47cb62d023f0ba7c5a916c9c653d5b368cc966382ae4e57da401 \ - --hash=sha256:24658baf6224d8f280e827f0a50c46ad819ec8ba380a42448e24459daf809cf4 \ - --hash=sha256:24aa705a5f5bd3a8bcfa4d123f03413de5d86e497435693b638cbffb7d5d8a1b \ - --hash=sha256:2770bb0d5e3cc0e31e7318db06efcbcdb7b31bcb1a70086d3177692a02256f59 \ - --hash=sha256:331ad15c39c9fe9186ceaf87203a9ecf5ae0ba2538c9e898e3a6967e8ad3db6f \ - --hash=sha256:3aa9d43b02a0c681f0bfbc12d476d47b2b2b6a3f9287f11ee42989a268a1833c \ - --hash=sha256:41f4915e09218744d8bae14759f983e466ab69b178de38066f7579892ff2a555 \ - --hash=sha256:4304d4416ff032ed50ad6bb87416d802e67139e31c0bde4628f36a47a3164bfa \ - --hash=sha256:435a22d00ec7d7ea533db494da8581b05977f9c37338c80bc86314bec2619424 \ - --hash=sha256:45f7cd36186db767d803b1473b3c659d57a23b5fa491ad83c6d40f2af58e4dbb \ - --hash=sha256:48b389b1fd5144603d61d752afd7167dfd205973a43151ae5045b35793232aa2 \ - --hash=sha256:4e67d26532bfd8b7f7c05d5a766d6f437b362c1bf203a3a5ce3593a645e870b8 \ - --hash=sha256:516a405f174fd3b88829eabfe4bb296ac602d6a0f68e0d64d5ac9456194a5b7e \ - --hash=sha256:5ba5c243f4004c750836f81606a9fcb7841f8874ad8f3bf204ff5e56332b72b9 \ - --hash=sha256:5bdc0f1f610d067c70aa3737ed06e2726fd9d6f7bfee4a351f4c40b6831f4e82 \ - --hash=sha256:6107e445faf057c118d5050560695e46d272e5301feffda3c41849641222a828 \ - --hash=sha256:6327b572f5770293fc062a7ec04160e89741e8552bf1c358d1a23eba68166759 \ - --hash=sha256:669b29a9eca6146465cc574659058ed949748f0809a2582d1f1a324eb91054dc \ - --hash=sha256:6ce01337d23884b21c03869d2f68c5523d43174d4fc405490eb0091057943118 \ - --hash=sha256:6d872186c1617d143969defeadac5a904e6e374183e07977eedef9c07c8953bf \ - --hash=sha256:6f76a90c345796c01d85e6332e81cab6d70de83b829cf1d9762d0a3da59c7932 \ - --hash=sha256:70d2aa9fb00cf52034feac4b913181a6e10356019b18ef89bc7c12a283bf5f5a \ - --hash=sha256:7cbc78dc018596315d4e7841c8c3a7ae31cc4d638c9b627f87d52e8abaaf2d29 \ - --hash=sha256:856bf0924d24e7f93b8aee12a3a1095c34085600aa805693fb7f5d1962393206 \ - --hash=sha256:8a98748ed1a1df4ee1d6f927e151ed6c1a09d5ec21684de879c7ea6aa96f58f2 \ - --hash=sha256:93a7350f6706b31f457c1457d3a3259ff9071a66f312ae64dc024f049055f72c \ - --hash=sha256:964823b2fc77b55355999ade496c54dde161c621cb1f6eac61dc30ed1b63cd4c \ - --hash=sha256:a003ac9edc22d99ae1286b0875c460351f4e101f8c9d9d2576e78d7e048f64e0 \ - --hash=sha256:a0ce71725cacc9ebf839630772b07eeec220cbb5f03be1399e0457a1464f8e1a \ - --hash=sha256:a47eef975d2b8b721775a0fa286f50eab535b9d56c70a6e62842134cf7841195 \ - --hash=sha256:a8b5b9712783415695663bd463990e2f00c6750562e6ad1d28e072a611c5f2a6 \ - --hash=sha256:a9015f5b8af1bb6837a3fcb0cdf3b874fe3385ff6274e8b7925d81ccaec3c5c9 \ - --hash=sha256:aec510255ce690d240f7cb23d7114f6b351c733a74c279a84def763660a2c3bc \ - --hash=sha256:b00e7bcd71caa0282cbe3c90966f738e2db91e64092a877c3ff7f19a1628fdcb \ - --hash=sha256:b50aaac7d05c2c26dfd50c3321199f019ba76bb650e346a6ef3616306eed67b0 \ - --hash=sha256:b7b6ea9e36d32582cda3465f54c4b454f62f23cb083ebc7a94e2ca6ef011c3a7 \ - --hash=sha256:bb9333f58fc3a2296fb1d54576138d4cf5d496a2cc118422bd77835e6ae0b9cb \ - --hash=sha256:c1c13185b90bbd3f8b5963cd8ce7ad4ff441924c31e23c975cb150e27c2bf67a \ - --hash=sha256:c3b8bd3133cd50f6b637bb4322822c94c5ce4bf0d724ed5ae70afce62187c492 \ - --hash=sha256:c5d97162c196ce54af6700949ddf9409e9833ef1003b4741c2b39ef46f1d9720 \ - --hash=sha256:c815270206f983309915a6844fe994b2fa47e5d05c4c4cef267c3b30e34dbe42 \ - --hash=sha256:cab2eba3830bf4f6d91e2d6718e0e1c14a2f5ad1af68a89d24ace0c6b17cced7 \ - --hash=sha256:d1df34588123fcc88c872f5acb6f74ae59e9d182a2707097f9e28275ec26a12d \ - --hash=sha256:d6bdcd415ba87846fd317bee0774e412e8792832e7805938987e4ede1d13046d \ - --hash=sha256:db9a30ec064129d605d0f1aedc93e00894b9334ec74ba9c6bdd08147434b33eb \ - --hash=sha256:dbc183e7bef690c9abe5ea67b7b60fdbca81aa8da43468287dae7b5c046107d4 \ - --hash=sha256:dca802c8db0720ce1c49cce1149ff7b06e91ba15fa84b1d59144fef1a1bc7ac2 \ - --hash=sha256:dec6b307ce928e8e112a6bb9921a1cb00a0e14979bf28b98e084a4b8a742bd9b \ - --hash=sha256:df8bb0010fdd0a743b7542589223a2816bdde4d94bb5ad67884348fa2c1c67e8 \ - --hash=sha256:e4094c7b464cf0a858e75cd14b03509e84789abf7b79f8537e6a72152109c76e \ - --hash=sha256:e4760a68cab57bfaa628938e9c2971137e05ce48e762a9cb53b76c9b569f1204 \ - --hash=sha256:eb09b82377233b902d4c3fbeeb7ad731cdab579c6c6fda1f763cd779139e47c3 \ - --hash=sha256:eb862356ee9391dc5a0b3cbc00f416b48c1b9a52d252d898e5b7696a5f9fe150 \ - --hash=sha256:ef9528915df81b8f4c7612b19b8628214c65c9b7f74db2e34a646a0a2a0da2d4 \ - --hash=sha256:f3157624b7558b914cb039fd1af735e5e8049a87c817cc215109ad1c8779df76 \ - --hash=sha256:f3e0992f23bbb0be00a921eae5363329253c3b86287db27092461c887b791e5e \ - --hash=sha256:f9338cc05451f1942d0d8203ec2c346c830f8e86469903d5126c1f0a13a2bcbb \ - --hash=sha256:ffef8fd58a36fb5f1196919638f73dd3ae0db1a878982b27a9a5a176ede4ba91 -colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0" and platform_system == "Windows" \ - --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ - --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 -cryptography==43.0.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:0663585d02f76929792470451a5ba64424acc3cd5227b03921dab0e2f27b1709 \ - --hash=sha256:08a24a7070b2b6804c1940ff0f910ff728932a9d0e80e7814234269f9d46d069 \ - --hash=sha256:232ce02943a579095a339ac4b390fbbe97f5b5d5d107f8a08260ea2768be8cc2 \ - --hash=sha256:2905ccf93a8a2a416f3ec01b1a7911c3fe4073ef35640e7ee5296754e30b762b \ - --hash=sha256:299d3da8e00b7e2b54bb02ef58d73cd5f55fb31f33ebbf33bd00d9aa6807df7e \ - --hash=sha256:2c6d112bf61c5ef44042c253e4859b3cbbb50df2f78fa8fae6747a7814484a70 \ - --hash=sha256:31e44a986ceccec3d0498e16f3d27b2ee5fdf69ce2ab89b52eaad1d2f33d8778 \ - --hash=sha256:3d9a1eca329405219b605fac09ecfc09ac09e595d6def650a437523fcd08dd22 \ - --hash=sha256:3dcdedae5c7710b9f97ac6bba7e1052b95c7083c9d0e9df96e02a1932e777895 \ - --hash=sha256:47ca71115e545954e6c1d207dd13461ab81f4eccfcb1345eac874828b5e3eaaf \ - --hash=sha256:4a997df8c1c2aae1e1e5ac49c2e4f610ad037fc5a3aadc7b64e39dea42249431 \ - --hash=sha256:51956cf8730665e2bdf8ddb8da0056f699c1a5715648c1b0144670c1ba00b48f \ - --hash=sha256:5bcb8a5620008a8034d39bce21dc3e23735dfdb6a33a06974739bfa04f853947 \ - --hash=sha256:64c3f16e2a4fc51c0d06af28441881f98c5d91009b8caaff40cf3548089e9c74 \ - --hash=sha256:6e2b11c55d260d03a8cf29ac9b5e0608d35f08077d8c087be96287f43af3ccdc \ - --hash=sha256:7b3f5fe74a5ca32d4d0f302ffe6680fcc5c28f8ef0dc0ae8f40c0f3a1b4fca66 \ - --hash=sha256:844b6d608374e7d08f4f6e6f9f7b951f9256db41421917dfb2d003dde4cd6b66 \ - --hash=sha256:9a8d6802e0825767476f62aafed40532bd435e8a5f7d23bd8b4f5fd04cc80ecf \ - --hash=sha256:aae4d918f6b180a8ab8bf6511a419473d107df4dbb4225c7b48c5c9602c38c7f \ - --hash=sha256:ac1955ce000cb29ab40def14fd1bbfa7af2017cca696ee696925615cafd0dce5 \ - --hash=sha256:b88075ada2d51aa9f18283532c9f60e72170041bba88d7f37e49cbb10275299e \ - --hash=sha256:cb013933d4c127349b3948aa8aaf2f12c0353ad0eccd715ca789c8a0f671646f \ - --hash=sha256:cc70b4b581f28d0a254d006f26949245e3657d40d8857066c2ae22a61222ef55 \ - --hash=sha256:e9c5266c432a1e23738d178e51c2c7a5e2ddf790f248be939448c0ba2021f9d1 \ - --hash=sha256:ea9e57f8ea880eeea38ab5abf9fbe39f923544d7884228ec67d666abd60f5a47 \ - --hash=sha256:ee0c405832ade84d4de74b9029bedb7b31200600fa524d218fc29bfa371e97f5 \ - --hash=sha256:fdcb265de28585de5b859ae13e3846a8e805268a823a12a4da2597f1f5afc9f0 -diff-match-patch==20230430 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:953019cdb9c9d2c9e47b5b12bcff3cf4746fc4598eb406076fa1fc27e6a1f15c \ - --hash=sha256:dce43505fb7b1b317de7195579388df0746d90db07015ed47a85e5e44930ef93 -django-import-export==4.1.1 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:16ecc5a9f0df46bde6eb278a3e65ebda0ee1db55656f36440e9fb83f40ab85a3 \ - --hash=sha256:730ae2443a02b1ba27d8dba078a27ae9123adfcabb78161b4f130843607b3df9 -django-jsonform==2.22.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:0c9d50fb371938e7262a7fef7c5a60835dd288f872f87b952d5e2ea84c825221 \ - --hash=sha256:c4dd1ba2b0152bd3164aacf326a83c35355c70d12de81908b5ced5f94c8263d6 -django-sage-tools==0.2.2 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:9244160056dd3907ac85e7888665ed7eed93b0fc2780e444e2b29eee0024372a \ - --hash=sha256:b8b87e1c950b16a73ae4797ee0ac0383a34cedb4fb432143c4913054007aeb14 -django==4.2.15 ; python_version >= "3.9" and python_version < "3.10" \ - --hash=sha256:61ee4a130efb8c451ef3467c67ca99fdce400fedd768634efc86a68c18d80d30 \ - --hash=sha256:c77f926b81129493961e19c0e02188f8d07c112a1162df69bfab178ae447f94a -django==5.1 ; python_version >= "3.10" and python_version < "4.0" \ - --hash=sha256:848a5980e8efb76eea70872fb0e4bc5e371619c70fffbe48e3e1b50b2c09455d \ - --hash=sha256:d3b811bf5371a26def053d7ee42a9df1267ef7622323fe70a601936725aa4557 -jinja2==3.1.4 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ - --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d -markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \ - --hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb -markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \ - --hash=sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff \ - --hash=sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f \ - --hash=sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3 \ - --hash=sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532 \ - --hash=sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f \ - --hash=sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617 \ - --hash=sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df \ - --hash=sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4 \ - --hash=sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906 \ - --hash=sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f \ - --hash=sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4 \ - --hash=sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8 \ - --hash=sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371 \ - --hash=sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2 \ - --hash=sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465 \ - --hash=sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52 \ - --hash=sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6 \ - --hash=sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169 \ - --hash=sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad \ - --hash=sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2 \ - --hash=sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0 \ - --hash=sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029 \ - --hash=sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f \ - --hash=sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a \ - --hash=sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced \ - --hash=sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5 \ - --hash=sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c \ - --hash=sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf \ - --hash=sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9 \ - --hash=sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb \ - --hash=sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad \ - --hash=sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3 \ - --hash=sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1 \ - --hash=sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46 \ - --hash=sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc \ - --hash=sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a \ - --hash=sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee \ - --hash=sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900 \ - --hash=sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5 \ - --hash=sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea \ - --hash=sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f \ - --hash=sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5 \ - --hash=sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e \ - --hash=sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a \ - --hash=sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f \ - --hash=sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50 \ - --hash=sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a \ - --hash=sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b \ - --hash=sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4 \ - --hash=sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff \ - --hash=sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2 \ - --hash=sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46 \ - --hash=sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b \ - --hash=sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf \ - --hash=sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5 \ - --hash=sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5 \ - --hash=sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab \ - --hash=sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd \ - --hash=sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68 -mdurl==0.1.2 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ - --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba -mimesis==11.1.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:574715564c937cd40eba23a0d184febbe04e538d5d120bfa5b951775200f3084 \ - --hash=sha256:5f3839751190f6eef7f453dfafb8f2f38dbdcda11bb3ad742589c216c24985f1 -pbr==6.1.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24 \ - --hash=sha256:a776ae228892d8013649c0aeccbb3d5f99ee15e005a4cbb7e61d55a067b28a2a -pillow==10.4.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:02a2be69f9c9b8c1e97cf2713e789d4e398c751ecfd9967c18d0ce304efbf885 \ - --hash=sha256:030abdbe43ee02e0de642aee345efa443740aa4d828bfe8e2eb11922ea6a21ea \ - --hash=sha256:06b2f7898047ae93fad74467ec3d28fe84f7831370e3c258afa533f81ef7f3df \ - --hash=sha256:0755ffd4a0c6f267cccbae2e9903d95477ca2f77c4fcf3a3a09570001856c8a5 \ - --hash=sha256:0a9ec697746f268507404647e531e92889890a087e03681a3606d9b920fbee3c \ - --hash=sha256:0ae24a547e8b711ccaaf99c9ae3cd975470e1a30caa80a6aaee9a2f19c05701d \ - --hash=sha256:134ace6dc392116566980ee7436477d844520a26a4b1bd4053f6f47d096997fd \ - --hash=sha256:166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06 \ - --hash=sha256:1b5dea9831a90e9d0721ec417a80d4cbd7022093ac38a568db2dd78363b00908 \ - --hash=sha256:1d846aea995ad352d4bdcc847535bd56e0fd88d36829d2c90be880ef1ee4668a \ - --hash=sha256:1ef61f5dd14c300786318482456481463b9d6b91ebe5ef12f405afbba77ed0be \ - --hash=sha256:297e388da6e248c98bc4a02e018966af0c5f92dfacf5a5ca22fa01cb3179bca0 \ - --hash=sha256:298478fe4f77a4408895605f3482b6cc6222c018b2ce565c2b6b9c354ac3229b \ - --hash=sha256:29dbdc4207642ea6aad70fbde1a9338753d33fb23ed6956e706936706f52dd80 \ - --hash=sha256:2db98790afc70118bd0255c2eeb465e9767ecf1f3c25f9a1abb8ffc8cfd1fe0a \ - --hash=sha256:32cda9e3d601a52baccb2856b8ea1fc213c90b340c542dcef77140dfa3278a9e \ - --hash=sha256:37fb69d905be665f68f28a8bba3c6d3223c8efe1edf14cc4cfa06c241f8c81d9 \ - --hash=sha256:416d3a5d0e8cfe4f27f574362435bc9bae57f679a7158e0096ad2beb427b8696 \ - --hash=sha256:43efea75eb06b95d1631cb784aa40156177bf9dd5b4b03ff38979e048258bc6b \ - --hash=sha256:4b35b21b819ac1dbd1233317adeecd63495f6babf21b7b2512d244ff6c6ce309 \ - --hash=sha256:4d9667937cfa347525b319ae34375c37b9ee6b525440f3ef48542fcf66f2731e \ - --hash=sha256:5161eef006d335e46895297f642341111945e2c1c899eb406882a6c61a4357ab \ - --hash=sha256:543f3dc61c18dafb755773efc89aae60d06b6596a63914107f75459cf984164d \ - --hash=sha256:551d3fd6e9dc15e4c1eb6fc4ba2b39c0c7933fa113b220057a34f4bb3268a060 \ - --hash=sha256:59291fb29317122398786c2d44427bbd1a6d7ff54017075b22be9d21aa59bd8d \ - --hash=sha256:5b001114dd152cfd6b23befeb28d7aee43553e2402c9f159807bf55f33af8a8d \ - --hash=sha256:5b4815f2e65b30f5fbae9dfffa8636d992d49705723fe86a3661806e069352d4 \ - --hash=sha256:5dc6761a6efc781e6a1544206f22c80c3af4c8cf461206d46a1e6006e4429ff3 \ - --hash=sha256:5e84b6cc6a4a3d76c153a6b19270b3526a5a8ed6b09501d3af891daa2a9de7d6 \ - --hash=sha256:6209bb41dc692ddfee4942517c19ee81b86c864b626dbfca272ec0f7cff5d9fb \ - --hash=sha256:673655af3eadf4df6b5457033f086e90299fdd7a47983a13827acf7459c15d94 \ - --hash=sha256:6c762a5b0997f5659a5ef2266abc1d8851ad7749ad9a6a5506eb23d314e4f46b \ - --hash=sha256:7086cc1d5eebb91ad24ded9f58bec6c688e9f0ed7eb3dbbf1e4800280a896496 \ - --hash=sha256:73664fe514b34c8f02452ffb73b7a92c6774e39a647087f83d67f010eb9a0cf0 \ - --hash=sha256:76a911dfe51a36041f2e756b00f96ed84677cdeb75d25c767f296c1c1eda1319 \ - --hash=sha256:780c072c2e11c9b2c7ca37f9a2ee8ba66f44367ac3e5c7832afcfe5104fd6d1b \ - --hash=sha256:7928ecbf1ece13956b95d9cbcfc77137652b02763ba384d9ab508099a2eca856 \ - --hash=sha256:7970285ab628a3779aecc35823296a7869f889b8329c16ad5a71e4901a3dc4ef \ - --hash=sha256:7a8d4bade9952ea9a77d0c3e49cbd8b2890a399422258a77f357b9cc9be8d680 \ - --hash=sha256:7c1ee6f42250df403c5f103cbd2768a28fe1a0ea1f0f03fe151c8741e1469c8b \ - --hash=sha256:7dfecdbad5c301d7b5bde160150b4db4c659cee2b69589705b6f8a0c509d9f42 \ - --hash=sha256:812f7342b0eee081eaec84d91423d1b4650bb9828eb53d8511bcef8ce5aecf1e \ - --hash=sha256:866b6942a92f56300012f5fbac71f2d610312ee65e22f1aa2609e491284e5597 \ - --hash=sha256:86dcb5a1eb778d8b25659d5e4341269e8590ad6b4e8b44d9f4b07f8d136c414a \ - --hash=sha256:87dd88ded2e6d74d31e1e0a99a726a6765cda32d00ba72dc37f0651f306daaa8 \ - --hash=sha256:8bc1a764ed8c957a2e9cacf97c8b2b053b70307cf2996aafd70e91a082e70df3 \ - --hash=sha256:8d4d5063501b6dd4024b8ac2f04962d661222d120381272deea52e3fc52d3736 \ - --hash=sha256:8f0aef4ef59694b12cadee839e2ba6afeab89c0f39a3adc02ed51d109117b8da \ - --hash=sha256:930044bb7679ab003b14023138b50181899da3f25de50e9dbee23b61b4de2126 \ - --hash=sha256:950be4d8ba92aca4b2bb0741285a46bfae3ca699ef913ec8416c1b78eadd64cd \ - --hash=sha256:961a7293b2457b405967af9c77dcaa43cc1a8cd50d23c532e62d48ab6cdd56f5 \ - --hash=sha256:9b885f89040bb8c4a1573566bbb2f44f5c505ef6e74cec7ab9068c900047f04b \ - --hash=sha256:9f4727572e2918acaa9077c919cbbeb73bd2b3ebcfe033b72f858fc9fbef0026 \ - --hash=sha256:a02364621fe369e06200d4a16558e056fe2805d3468350df3aef21e00d26214b \ - --hash=sha256:a985e028fc183bf12a77a8bbf36318db4238a3ded7fa9df1b9a133f1cb79f8fc \ - --hash=sha256:ac1452d2fbe4978c2eec89fb5a23b8387aba707ac72810d9490118817d9c0b46 \ - --hash=sha256:b15e02e9bb4c21e39876698abf233c8c579127986f8207200bc8a8f6bb27acf2 \ - --hash=sha256:b2724fdb354a868ddf9a880cb84d102da914e99119211ef7ecbdc613b8c96b3c \ - --hash=sha256:bbc527b519bd3aa9d7f429d152fea69f9ad37c95f0b02aebddff592688998abe \ - --hash=sha256:bcd5e41a859bf2e84fdc42f4edb7d9aba0a13d29a2abadccafad99de3feff984 \ - --hash=sha256:bd2880a07482090a3bcb01f4265f1936a903d70bc740bfcb1fd4e8a2ffe5cf5a \ - --hash=sha256:bee197b30783295d2eb680b311af15a20a8b24024a19c3a26431ff83eb8d1f70 \ - --hash=sha256:bf2342ac639c4cf38799a44950bbc2dfcb685f052b9e262f446482afaf4bffca \ - --hash=sha256:c76e5786951e72ed3686e122d14c5d7012f16c8303a674d18cdcd6d89557fc5b \ - --hash=sha256:cbed61494057c0f83b83eb3a310f0bf774b09513307c434d4366ed64f4128a91 \ - --hash=sha256:cfdd747216947628af7b259d274771d84db2268ca062dd5faf373639d00113a3 \ - --hash=sha256:d7480af14364494365e89d6fddc510a13e5a2c3584cb19ef65415ca57252fb84 \ - --hash=sha256:dbc6ae66518ab3c5847659e9988c3b60dc94ffb48ef9168656e0019a93dbf8a1 \ - --hash=sha256:dc3e2db6ba09ffd7d02ae9141cfa0ae23393ee7687248d46a7507b75d610f4f5 \ - --hash=sha256:dfe91cb65544a1321e631e696759491ae04a2ea11d36715eca01ce07284738be \ - --hash=sha256:e4d49b85c4348ea0b31ea63bc75a9f3857869174e2bf17e7aba02945cd218e6f \ - --hash=sha256:e4db64794ccdf6cb83a59d73405f63adbe2a1887012e308828596100a0b2f6cc \ - --hash=sha256:e553cad5179a66ba15bb18b353a19020e73a7921296a7979c4a2b7f6a5cd57f9 \ - --hash=sha256:e88d5e6ad0d026fba7bdab8c3f225a69f063f116462c49892b0149e21b6c0a0e \ - --hash=sha256:ecd85a8d3e79cd7158dec1c9e5808e821feea088e2f69a974db5edf84dc53141 \ - --hash=sha256:f5b92f4d70791b4a67157321c4e8225d60b119c5cc9aee8ecf153aace4aad4ef \ - --hash=sha256:f5f0c3e969c8f12dd2bb7e0b15d5c468b51e5017e01e2e867335c81903046a22 \ - --hash=sha256:f7baece4ce06bade126fb84b8af1c33439a76d8a6fd818970215e0560ca28c27 \ - --hash=sha256:ff25afb18123cea58a591ea0244b92eb1e61a1fd497bf6d6384f09bc3262ec3e \ - --hash=sha256:ff337c552345e95702c5fde3158acb0625111017d0e5f24bf3acdb9cc16b90d1 -pycparser==2.22 ; python_version >= "3.9" and python_version < "4.0" and platform_python_implementation != "PyPy" \ - --hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \ - --hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc -pygments==2.18.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199 \ - --hash=sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a -pyyaml==6.0.2 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff \ - --hash=sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48 \ - --hash=sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086 \ - --hash=sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e \ - --hash=sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133 \ - --hash=sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5 \ - --hash=sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484 \ - --hash=sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee \ - --hash=sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5 \ - --hash=sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68 \ - --hash=sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a \ - --hash=sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf \ - --hash=sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99 \ - --hash=sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8 \ - --hash=sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85 \ - --hash=sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19 \ - --hash=sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc \ - --hash=sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a \ - --hash=sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1 \ - --hash=sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317 \ - --hash=sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c \ - --hash=sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631 \ - --hash=sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d \ - --hash=sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652 \ - --hash=sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5 \ - --hash=sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e \ - --hash=sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b \ - --hash=sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8 \ - --hash=sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476 \ - --hash=sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706 \ - --hash=sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563 \ - --hash=sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237 \ - --hash=sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b \ - --hash=sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083 \ - --hash=sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180 \ - --hash=sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425 \ - --hash=sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e \ - --hash=sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f \ - --hash=sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725 \ - --hash=sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183 \ - --hash=sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab \ - --hash=sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774 \ - --hash=sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725 \ - --hash=sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e \ - --hash=sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5 \ - --hash=sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d \ - --hash=sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290 \ - --hash=sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44 \ - --hash=sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed \ - --hash=sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4 \ - --hash=sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba \ - --hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \ - --hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4 -rich==13.8.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc \ - --hash=sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4 -sqlparse==0.5.1 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:773dcbf9a5ab44a090f3441e2180efe2560220203dc2f8c0b0fa141e18b505e4 \ - --hash=sha256:bb6b4df465655ef332548e24f08e205afc81b9ab86cb1c45657a7ff173a3a00e -stevedore==5.3.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:1efd34ca08f474dad08d9b19e934a22c68bb6fe416926479ba29e5013bcc8f78 \ - --hash=sha256:9a64265f4060312828151c204efbe9b7a9852a0d9228756344dbc7e4023e375a -tablib==3.5.0 ; python_version >= "3.9" and python_version < "4.0" \ - --hash=sha256:9821caa9eca6062ff7299fa645e737aecff982e6b2b42046928a6413c8dabfd9 \ - --hash=sha256:f6661dfc45e1d4f51fa8a6239f9c8349380859a5bfaa73280645f046d6c96e33 -tomli==2.0.1 ; python_version < "3.11" and python_version >= "3.9" \ - --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ - --hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f -typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "3.11" \ - --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ - --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 -tzdata==2024.1 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32" \ - --hash=sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd \ - --hash=sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252 +asgiref==3.8.1 ; python_version >= "3.9" and python_version < "4.0" +bandit[toml]==1.7.10 ; python_version >= "3.9" and python_version < "4.0" +cffi==1.17.1 ; python_version >= "3.9" and python_version < "4.0" and platform_python_implementation != "PyPy" +colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0" and platform_system == "Windows" +cryptography==43.0.1 ; python_version >= "3.9" and python_version < "4.0" +diff-match-patch==20230430 ; python_version >= "3.9" and python_version < "4.0" +django-import-export==4.1.1 ; python_version >= "3.9" and python_version < "4.0" +django-jsonform==2.23.1 ; python_version >= "3.9" and python_version < "4.0" +django-sage-tools==0.3.5 ; python_version >= "3.9" and python_version < "4.0" +django==4.2.16 ; python_version >= "3.9" and python_version < "3.10" +django==5.1.2 ; python_version >= "3.10" and python_version < "4.0" +jinja2==3.1.4 ; python_version >= "3.9" and python_version < "4.0" +markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "4.0" +markupsafe==3.0.0 ; python_version >= "3.9" and python_version < "4.0" +mdurl==0.1.2 ; python_version >= "3.9" and python_version < "4.0" +mimesis==11.1.0 ; python_version >= "3.9" and python_version < "4.0" +pbr==6.1.0 ; python_version >= "3.9" and python_version < "4.0" +pillow==10.4.0 ; python_version >= "3.9" and python_version < "4.0" +pycparser==2.22 ; python_version >= "3.9" and python_version < "4.0" and platform_python_implementation != "PyPy" +pygments==2.18.0 ; python_version >= "3.9" and python_version < "4.0" +pyyaml==6.0.2 ; python_version >= "3.9" and python_version < "4.0" +rich==13.9.2 ; python_version >= "3.9" and python_version < "4.0" +sqlparse==0.5.1 ; python_version >= "3.9" and python_version < "4.0" +stevedore==5.3.0 ; python_version >= "3.9" and python_version < "4.0" +tablib==3.5.0 ; python_version >= "3.9" and python_version < "4.0" +tomli==2.0.2 ; python_version < "3.11" and python_version >= "3.9" +typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "3.11" +tzdata==2024.2 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32" diff --git a/sage_invoice/helpers/funcs.py b/sage_invoice/helpers/funcs.py index fbe2e69..824983b 100644 --- a/sage_invoice/helpers/funcs.py +++ b/sage_invoice/helpers/funcs.py @@ -7,29 +7,22 @@ from sage_invoice.service.discovery import JinjaTemplateDiscovery -def get_template_choices(is_receipt=False): - """Dynamically generates the template choices based on the templates Only - the base name of the template is shown in the choices. +def get_template_choices(): """ - template_discovery = JinjaTemplateDiscovery( - models_dir=getattr(settings, "SAGE_MODEL_TEMPLATE", "sage_invoice") - ) - - templates = ( - template_discovery.receipt_templates - if is_receipt - else template_discovery.SAGE_MODEL_TEMPLATEs - ) - - choices = [ - ( - key, - f"{os.path.basename(value).replace('.jinja2', '').replace('_', ' ').title()} Template", - ) - for key, value in templates.items() - ] - - return choices or [("", "No Templates Available")] + Returns a combined list of default and custom templates, formatted for use in a + model's choices field. + """ + discovery = JinjaTemplateDiscovery() + default_templates = discovery.get_default_templates() + custom_templates = discovery.get_custom_templates() + + choices = [(template, template) for template in default_templates] + choices += [(template, template) for template in custom_templates] + + if not choices: + return [("", "No templates available")] + + return choices def generate_tracking_code(user_input: str, creation_date: datetime) -> str: diff --git a/sage_invoice/service/discovery.py b/sage_invoice/service/discovery.py index 1324c04..d7aed9b 100644 --- a/sage_invoice/service/discovery.py +++ b/sage_invoice/service/discovery.py @@ -1,57 +1,56 @@ import os +from django.apps import apps from django.conf import settings class JinjaTemplateDiscovery: - SAGE_MODEL_PREFIX = getattr(settings, "SAGE_MODEL_PREFIX", "quotation") - receipt_prefix = "receipt" - - def __init__(self, models_dir: str = "templates"): - self.models_dir = os.path.join( - settings.BASE_DIR, "sage_invoice", "templates", models_dir + def __init__(self): + self.default_template_dir = "default_invoices" # inside package + self.custom_template_dir = ( + settings.SAGE_MODEL_TEMPLATE + ) # custom templates folder name + self.custom_template_prefix = ( + settings.SAGE_MODEL_PREFIX + ) # custom template prefix + + def get_default_templates(self): + """Return a list of default templates found in the package's template directory.""" + # Use Django's template loading mechanisms to discover default templates. + default_path = os.path.join( + apps.get_app_config("sage_invoice").path, + "templates", + self.default_template_dir, ) - self.SAGE_MODEL_TEMPLATEs = {} - self.receipt_templates = {} - self.discover() - - def discover(self): - """Discovers model and receipt template files in the specified models - directory and categorizes them into SAGE_MODEL_TEMPLATEs and. - - receipt_templates dictionaries. - """ - for filename in os.listdir(self.models_dir): - if filename.endswith(".jinja2"): - if filename.startswith(self.SAGE_MODEL_PREFIX): - name, _ = os.path.splitext(filename) - if len(self.SAGE_MODEL_PREFIX) <= len(".jinja2"): - template_name = "".join(filter(str.isdigit, name)) - else: - template_name = filename[ - len(self.SAGE_MODEL_PREFIX) : -len(".jinja2") - ] - - self.SAGE_MODEL_TEMPLATEs[template_name] = os.path.join( - self.models_dir, filename - ) - elif filename.startswith(self.receipt_prefix): - name, _ = os.path.splitext(filename) - if len(self.receipt_prefix) <= len(".jinja2"): - template_name = "".join(filter(str.isdigit, name)) - else: - template_name = filename[ - len(self.receipt_prefix) : -len(".jinja2") - ] - self.receipt_templates[template_name] = os.path.join( - self.models_dir, filename + return self._find_templates_in_directory(default_path) + + def get_custom_templates(self): + """Return a list of custom templates found in each app's `templates/` directory.""" + template_choices = [] + for app_config in apps.get_app_configs(): + template_dir = os.path.join( + app_config.path, "templates", self.custom_template_dir + ) + if os.path.exists(template_dir): + template_choices.extend( + self._find_templates_in_directory( + template_dir, self.custom_template_prefix ) + ) + return template_choices - def get_template_path(self, template_choice, is_receipt=False): - """Returns the template path based on the template choice and whether - it is a receipt. + def _find_templates_in_directory(self, directory, prefix=None): + """ + Helper method to find .jinja2 files in a directory, optionally filtering by + prefix. """ - if is_receipt: - return self.receipt_templates.get(template_choice) - else: - return self.SAGE_MODEL_TEMPLATEs.get(template_choice) + if not os.path.exists(directory): + return [] + + templates = [] + for filename in os.listdir(directory): + if filename.endswith(".jinja2") and ( + not prefix or filename.startswith(prefix) + ): + templates.append(filename) + return templates diff --git a/sage_invoice/service/invoice_create.py b/sage_invoice/service/invoice_create.py index ff5a25d..4ccac28 100644 --- a/sage_invoice/service/invoice_create.py +++ b/sage_invoice/service/invoice_create.py @@ -23,7 +23,7 @@ def __init__(self) -> None: """ logger.info("Initializing QuotationService") self.template_discovery = JinjaTemplateDiscovery( - models_dir=getattr(settings, "SAGE_MODEL_TEMPLATE", "sage_invoice") + models_dir=getattr(settings, "SAGE_MODEL_TEMPLATE", "default_invoices") ) self.env = Environment( loader=FileSystemLoader(self.template_discovery.models_dir), diff --git a/sage_invoice/templates/sage_invoice/invoice1.jinja2 b/sage_invoice/templates/default_invoices/quotation_1.jinja2 similarity index 100% rename from sage_invoice/templates/sage_invoice/invoice1.jinja2 rename to sage_invoice/templates/default_invoices/quotation_1.jinja2 diff --git a/sage_invoice/templates/sage_invoice/invoice2.jinja2 b/sage_invoice/templates/default_invoices/quotation_2.jinja2 similarity index 100% rename from sage_invoice/templates/sage_invoice/invoice2.jinja2 rename to sage_invoice/templates/default_invoices/quotation_2.jinja2 diff --git a/sage_invoice/templates/sage_invoice/invoice3.jinja2 b/sage_invoice/templates/default_invoices/quotation_3.jinja2 similarity index 100% rename from sage_invoice/templates/sage_invoice/invoice3.jinja2 rename to sage_invoice/templates/default_invoices/quotation_3.jinja2 diff --git a/sage_invoice/templates/sage_invoice/invoice4.jinja2 b/sage_invoice/templates/default_invoices/quotation_4.jinja2 similarity index 100% rename from sage_invoice/templates/sage_invoice/invoice4.jinja2 rename to sage_invoice/templates/default_invoices/quotation_4.jinja2 diff --git a/sage_invoice/templates/sage_invoice/receipt1.jinja2 b/sage_invoice/templates/default_invoices/receipt1.jinja2 similarity index 100% rename from sage_invoice/templates/sage_invoice/receipt1.jinja2 rename to sage_invoice/templates/default_invoices/receipt1.jinja2 diff --git a/sage_invoice/templates/sage_invoice/receipt2.jinja2 b/sage_invoice/templates/default_invoices/receipt2.jinja2 similarity index 100% rename from sage_invoice/templates/sage_invoice/receipt2.jinja2 rename to sage_invoice/templates/default_invoices/receipt2.jinja2 diff --git a/sage_invoice/templates/sage_invoice/receipt3.jinja2 b/sage_invoice/templates/default_invoices/receipt3.jinja2 similarity index 100% rename from sage_invoice/templates/sage_invoice/receipt3.jinja2 rename to sage_invoice/templates/default_invoices/receipt3.jinja2 diff --git a/sage_invoice/tests/test_helpers.py b/sage_invoice/tests/test_helpers.py index 6b24ac2..18f08e7 100644 --- a/sage_invoice/tests/test_helpers.py +++ b/sage_invoice/tests/test_helpers.py @@ -15,7 +15,7 @@ def test_get_template_choices_for_invoice(self, mock_settings, mock_discovery): """Test template choices for an invoice (non-receipt).""" mock_settings.SAGE_MODEL_TEMPLATE = "sage_invoice" mock_discovery_instance = mock_discovery.return_value - mock_discovery_instance.SAGE_MODEL_TEMPLATEs = { + mock_discovery_instance.SAGE_MODEL_TEMPLATE = { "template1": "/path/to/template1.jinja2", "template2": "/path/to/template2.jinja2" } @@ -51,7 +51,7 @@ def test_get_template_choices_no_templates(self): """Test when no templates are available.""" with mock.patch("sage_invoice.helpers.funcs.JinjaTemplateDiscovery") as mock_discovery: mock_discovery_instance = mock_discovery.return_value - mock_discovery_instance.SAGE_MODEL_TEMPLATEs = {} + mock_discovery_instance.SAGE_MODEL_TEMPLATE = {} mock_discovery_instance.receipt_templates = {} choices = get_template_choices(is_receipt=False)