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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"django_stubs_ext==6.0.4",
"django-tables2==2.8.0",
"django-taggit==6.1.0",
"django-weasyprint==2.4.0",
"django-weasyprint==2.5.0",
"icalendar==7.1.0",
"irc3==1.1.10",
"lxml==6.1.0",
Expand Down
4 changes: 2 additions & 2 deletions src/utils/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.contrib.auth.models import AnonymousUser
from django.template.loader import render_to_string
from django.test.client import RequestFactory
from django_weasyprint.utils import django_url_fetcher
from django_weasyprint.utils import DjangoURLFetcher
from weasyprint import HTML

logger = logging.getLogger(f"bornhack.{__name__}")
Expand All @@ -21,7 +21,7 @@ def generate_pdf_letter(filename, template, formatdict):
formatdict["dev"] = settings.PDF_TEST_MODE
weasy_html = HTML(
string=render_to_string(template, context=formatdict, request=request),
url_fetcher=django_url_fetcher,
url_fetcher=DjangoURLFetcher(),
base_url="file://",
)
pdf = io.BytesIO()
Expand Down
Loading