Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Commit

Permalink
Fix assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Defelo committed Jan 11, 2024
1 parent b40eba9 commit 83b8085
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion api/utils/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ async def send(
BOUGHT_COINS = Message(
title="Kaufbestätigung - Bootstrap Academy",
template="bought_coins.html",
attachments=[Path("assets/allgemeine_geschaeftsbedingungen.pdf"), Path("assets/widerrufsbelehrung.pdf")],
attachments=[
Path(__file__).parent / "../../assets/allgemeine_geschaeftsbedingungen.pdf",
Path(__file__).parent / "../../assets/widerrufsbelehrung.pdf",
],
)


Expand Down
6 changes: 5 additions & 1 deletion api/utils/invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ def generate_invoice_pdf(
t.add(Paragraph(""))
t.add(
Image(
Path("assets/logo-text.png"), width=183, height=51, horizontal_alignment=Alignment.RIGHT, padding_bottom=24
Path(__file__).parent / "../../assets/logo-text.png",
width=183,
height=51,
horizontal_alignment=Alignment.RIGHT,
padding_bottom=24,
)
)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
homepage = "https://github.com/Bootstrap-Academy/shop-ms"
repository = "https://github.com/Bootstrap-Academy/shop-ms"
packages = [{ include = "api" }]
include = ["pyproject.toml", "templates/*"]
include = ["pyproject.toml", "templates/*", "assets/*"]

[tool.poetry.dependencies]
python = "^3.11"
Expand Down

0 comments on commit 83b8085

Please sign in to comment.