Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ readme = "README.md"
requires-python = ">=3.13,<4.0"
dependencies = [
"django (>=5.2.12,<6.0)",
"django-weasyprint (>=2.4.0,<3.0.0)",
"django-weasyprint (>=2.5.0,<3.0.0)",
"django-extensions (>=4.1,<5.0)",
"django-bootstrap-datepicker-plus (>=5.0.6,<6.0.0)",
"psycopg2 (>=2.9.11,<3.0.0)",
Expand All @@ -20,7 +20,7 @@ dependencies = [
"tablib (>=3.9.0,<4.0.0)",
"django-phonenumber-field (>=8.3.0,<9.0.0)",
"phonenumbers (>=9.0.26,<10.0.0)",
"weasyprint (>=68.1,<69.0)", # Update when https://github.com/fdemmer/django-weasyprint/issues/106 is resolved
"weasyprint (>=68.1,<69.0)",
"django-select2 (>=8.4.3,<9.0.0)",
"gunicorn (>=25.1.0,<26.0.0)",
"django-environ (>=0.13.0,<0.14.0)",
Expand Down
4 changes: 2 additions & 2 deletions tapir/utils/pdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.conf import settings
from django.template.loader import render_to_string
from django.utils import translation
from django_weasyprint.utils import django_url_fetcher
from django_weasyprint.utils import DjangoURLFetcher
from weasyprint import Document
from weasyprint.text.fonts import FontConfiguration

Expand All @@ -20,6 +20,6 @@ def render_pdf(templates: List, context: dict, language: str) -> Document:
document = weasyprint.HTML(
string=rendered_html,
base_url=settings.WEASYPRINT_BASEURL,
url_fetcher=django_url_fetcher,
url_fetcher=DjangoURLFetcher(),
)
return document.render(font_config=_WEASYPRINT_FONT_CONFIG)
Loading