Skip to content
Snippets Groups Projects
Verified Commit 7317f377 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Update changelog

parent 04be2a94
No related branches found
No related tags found
1 merge request!811Resolve "PDF generation doesn't use context processors"
Pipeline #44417 passed with warnings
...@@ -18,6 +18,7 @@ Fixed ...@@ -18,6 +18,7 @@ Fixed
~~~~~ ~~~~~
* View for assigning permissions didn't work with some global permissions. * View for assigning permissions didn't work with some global permissions.
* PDFs generated in background didn't contain logo or site title.
`2.2.1_ – 2021-12-02 `2.2.1_ – 2021-12-02
-------------------- --------------------
......
...@@ -75,6 +75,8 @@ def generate_pdf_from_template( ...@@ -75,6 +75,8 @@ def generate_pdf_from_template(
if not request: if not request:
processed_context = process_custom_context_processors(settings.PDF_CONTEXT_PROCESSORS) processed_context = process_custom_context_processors(settings.PDF_CONTEXT_PROCESSORS)
processed_context.update(context) processed_context.update(context)
else:
processed_context = context
html_template = render_to_string(template_name, processed_context, request) html_template = render_to_string(template_name, processed_context, request)
file_object = PDFFile.objects.create(html_file=ContentFile(html_template, name="source.html")) file_object = PDFFile.objects.create(html_file=ContentFile(html_template, name="source.html"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment