Skip to content

Commit

Permalink
Adjust url used to 0.0.0.0 for AR images
Browse files Browse the repository at this point in the history
  • Loading branch information
idabblewith committed May 12, 2024
1 parent b6a66ff commit dedc9ea
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
16 changes: 8 additions & 8 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import os
import environ

# import sentry_sdk
# from sentry_sdk.integrations.django import DjangoIntegration
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration


# Project ENV ===================================================================
Expand Down Expand Up @@ -265,12 +265,12 @@


# Logs and Tracking =======================================================================
# if not DEBUG:
# sentry_sdk.init(
# dsn=env("SENTRY_URL"),
# traces_sample_rate=1.0,
# profiles_sample_rate=1.0,
# )
if not DEBUG:
sentry_sdk.init(
dsn=env("SENTRY_URL"),
traces_sample_rate=1.0,
profiles_sample_rate=1.0,
)


class ColoredFormatter(logging.Formatter):
Expand Down
12 changes: 6 additions & 6 deletions documents/templates/annual_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ <h1 id="sdschaptertext" class="chapter_title_text">Service Delivery Structure</h
<div class="section_content_container">
{% comment %} SDS CHART {% endcomment %}
<div class="sds_chart_image_container">
<img class="sds_chart_image" alt="BCS SDS Chart Image: {{server_url}}{{sds_data.chart}}"
<img class="sds_chart_image" alt="BCS SDS Chart Image"
src="{{server_url}}{{sds_data.chart}}"/>
</div>
{% comment %} SDS INTRO {% endcomment %}
Expand All @@ -625,7 +625,7 @@ <h1 id="sdschaptertext" class="chapter_title_text">Service Delivery Structure</h
<div class="chapter_image_container">
<img
class="chapter_image"
alt="{{ba_item.ba_name}} Image: {{server_url}}{{ba_item.ba_image.file}}"
alt="{{ba_item.ba_name}} Image"
src="{{server_url}}{{ba_item.ba_image.file}}"
/>
</div>
Expand All @@ -650,7 +650,7 @@ <h1 id="{{ba_item.ba_name}}" class="chapter_title_text">{{ba_item.ba_name}}</h1>

<div class="pr_img_container_lhs">
<img class="pr_image"
alt="{{report.document.project.title}} Image: {{server_url}}{{report.document.project.image.file}}"
alt="{{report.document.project.title}} Image"
src="{{server_url}}{{report.document.project.image.file}}"
/>
</div>
Expand All @@ -673,7 +673,7 @@ <h2 id="{{ report.document.project.title | safe | extract_text_content }}" class
{% if forloop.counter|divisibleby:2 %}
<div class="pr_img_container_rhs">
<img class="pr_image"
alt="{{report.document.project.title}} Image: {{server_url}}{{report.document.project.image.file}}"
alt="{{report.document.project.title}} Image"
src="{{server_url}}{{report.document.project.image.file}}"
/>
</div>
Expand Down Expand Up @@ -867,7 +867,7 @@ <h1 id="studentreports" class="chapter_title_text">Student Project Reports</h1>

<div class="pr_img_container_lhs">
<img class="pr_image"
alt="{{report.document.project.title}} Image: {{server_url}}{{report.document.project.image.file}}"
alt="{{report.document.project.title}} Image"
src="{{server_url}}{{report.document.project.image.file}}"
/>
</div>
Expand Down Expand Up @@ -904,7 +904,7 @@ <h2 id="{{ report.document.project.title | safe | extract_text_content }}" class
{% if forloop.counter|divisibleby:2 %}
<div class="pr_img_container_rhs">
<img class="pr_image"
alt="{{report.document.project.title}} Image: {{server_url}}{{report.document.project.image.file}}"
alt="{{report.document.project.title}} Image"
src="{{server_url}}{{report.document.project.image.file}}"
/>
</div>
Expand Down
18 changes: 12 additions & 6 deletions documents/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,8 @@ def get_formatted_datetime(now):
"server_url": (
"http://127.0.0.1:8000"
if settings.DEBUG == True
else settings.SITE_URL
# else settings.SITE_URL
else "http://0.0.0.0:8000"
),
"frontend_url": (
"http://127.0.0.1:3000"
Expand Down Expand Up @@ -1628,7 +1629,8 @@ def get_inner_html(html_content, html_tag):
"server_url": (
"http://127.0.0.1:8000"
if settings.DEBUG == True
else settings.SITE_URL
# else settings.SITE_URL
else "http://0.0.0.0:8000"
),
"frontend_url": (
"http://127.0.0.1:3000"
Expand Down Expand Up @@ -1706,7 +1708,8 @@ def get_inner_html(html_content, html_tag):
"server_url": (
"http://127.0.0.1:8000"
if settings.DEBUG == True
else settings.SITE_URL
# else settings.SITE_URL
else "http://0.0.0.0:8000"
),
"frontend_url": (
"http://127.0.0.1:3000"
Expand Down Expand Up @@ -1809,7 +1812,8 @@ def get_inner_html(html_content, html_tag):
"server_url": (
"http://127.0.0.1:8000"
if settings.DEBUG == True
else settings.SITE_URL
# else settings.SITE_URL
else "http://0.0.0.0:8000"
),
"frontend_url": (
"http://127.0.0.1:3000"
Expand Down Expand Up @@ -1875,7 +1879,8 @@ def get_inner_html(html_content, html_tag):
"server_url": (
"http://127.0.0.1:8000"
if settings.DEBUG == True
else settings.SITE_URL
# else settings.SITE_URL
else "http://0.0.0.0:8000"
),
"frontend_url": (
"http://127.0.0.1:3000"
Expand Down Expand Up @@ -1924,7 +1929,8 @@ def get_inner_html(html_content, html_tag):
"server_url": (
"http://127.0.0.1:8000"
if settings.DEBUG == True
else settings.SITE_URL
# else settings.SITE_URL
else "http://0.0.0.0:8000"
),
"frontend_url": (
"http://127.0.0.1:3000"
Expand Down

0 comments on commit dedc9ea

Please sign in to comment.