Skip to content

Commit

Permalink
fix(template-discovery): resolve issue with template discovery during…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
MohmdFo committed Oct 16, 2024
1 parent 80b5df6 commit 76988d5
Show file tree
Hide file tree
Showing 14 changed files with 135 additions and 475 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <radin@sageteam.org>", "Sepehr Akbarzadeh <sepehr@sageteam.org>" ]
keywords = [ "django", "invoice", "sageteam", "django-packages" ]
Expand Down
83 changes: 42 additions & 41 deletions requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand All @@ -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"
Loading

0 comments on commit 76988d5

Please sign in to comment.