Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Merge requests
!811
Resolve "PDF generation doesn't use context processors"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "PDF generation doesn't use context processors"
546-pdf-generation-doesn-t-use-context-processors
into
master
Overview
0
Commits
2
Pipelines
3
Changes
2
Merged
Jonathan Weth
requested to merge
546-pdf-generation-doesn-t-use-context-processors
into
master
3 years ago
Overview
0
Commits
2
Pipelines
3
Changes
2
Expand
Closes
#546 (closed)
Edited
3 years ago
by
Jonathan Weth
0
0
Merge request reports
Viewing commit
7317f377
Prev
Next
Show latest version
2 files
+
3
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
Verified
7317f377
Update changelog
· 7317f377
Jonathan Weth
authored
3 years ago
aleksis/core/util/pdf.py
+
2
−
0
Options
@@ -75,6 +75,8 @@ def generate_pdf_from_template(
if
not
request
:
processed_context
=
process_custom_context_processors
(
settings
.
PDF_CONTEXT_PROCESSORS
)
processed_context
.
update
(
context
)
else
:
processed_context
=
context
html_template
=
render_to_string
(
template_name
,
processed_context
,
request
)
file_object
=
PDFFile
.
objects
.
create
(
html_file
=
ContentFile
(
html_template
,
name
=
"
source.html
"
))
Loading