Skip to content

Commit

Permalink
style: update dbca image
Browse files Browse the repository at this point in the history
  • Loading branch information
idabblewith committed Oct 18, 2024
1 parent 47884b4 commit eac0744
Show file tree
Hide file tree
Showing 2 changed files with 529 additions and 393 deletions.
13 changes: 13 additions & 0 deletions config/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,16 @@ def get_encoded_image():
return f"data:image/jpeg;base64,{image_encoded}"
else:
return None


def get_encoded_ar_dbca_image():
# Find the path to the image using Django's staticfiles finders
image_path = os.path.join(settings.BASE_DIR, "documents", "BCSTransparent.png")
print(f"AR DBCA IMAGE PATH: {image_path}")
if image_path and os.path.exists(image_path):
with open(image_path, "rb") as image_file:
image_data = image_file.read()
image_encoded = base64.b64encode(image_data).decode("utf-8")
return f"data:image/png;base64,{image_encoded}"
else:
return None
Loading

0 comments on commit eac0744

Please sign in to comment.