Skip to content

Commit

Permalink
Fix form abspath
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Feb 23, 2024
1 parent ee89c68 commit e6fe233
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/donations/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
pdfmetrics.registerFont(TTFont("OpenSans", font_path))

default_font_size = 15
form_image_path = "/static/images/formular-2021.jpg"
form_image_path = abs_path + "/static_extras/images/formular-2021.jpg"


def format_ngo_account(ngo_account: str):
Expand Down Expand Up @@ -211,6 +211,7 @@ def create_pdf(person: Dict, ong: Dict):
width, height = A4

# add the image as a background

background = ImageReader(abs_path + form_image_path)
c.drawImage(background, 0, 0, width=width, height=height)

Expand Down

0 comments on commit e6fe233

Please sign in to comment.