Skip to content

Commit bfb23d2

Browse files
committed
Use static template tags for go-logo in admin panel
Additional label changes
1 parent ca16610 commit bfb23d2

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

api/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def generate_url(url, export_id, user, title):
137137
)
138138
except Exception:
139139
logger.error(
140-
"Failed to export PDF",
140+
f"Failed to export PDF: {export.export_type}",
141141
exc_info=True,
142142
extra=logger_context(dict(export_id=export.pk)),
143143
)

api/templates/admin/base_site.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<h1 id="site-name">
1010
<a href="{% url 'admin:index' %}">
11-
<img height="40" src="/static/images/logo/go-logo-2020-6cdc2b0c.svg">
11+
<img height="40" src="{% static "images/logo/go-logo-2020-6cdc2b0c.svg" %}" />
1212
</a>
1313
{% if HAVING_INGEST_ISSUE and request.user.is_superuser %}
1414
<span title="Ingest issue – please check erroneous api/CronJob item">

main/settings.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
AWS_S3_REGION_NAME=str,
5555
AWS_S3_MEDIA_BUCKET_NAME=str,
5656
AWS_S3_STATIC_BUCKET_NAME=str,
57-
# -- Filesystem (default) XXX: Don't use for production
57+
# -- Filesystem (default) XXX: Don't use in production
5858
DJANGO_MEDIA_ROOT=(str, os.path.join(BASE_DIR, "media")),
5959
DJANGO_STATIC_ROOT=(str, os.path.join(BASE_DIR, "static")),
6060
# Email
@@ -155,10 +155,7 @@ def find_env_with_value(*keys: str) -> None | str:
155155

156156

157157
def parse_domain(*env_keys: str) -> str:
158-
"""
159-
NOTE: This is used for to avoid breaking due to existing config value
160-
Update this using django validation
161-
"""
158+
# FIXME: This is for backward compatibility for the existing config value
162159
env_key = find_env_with_value(*env_keys)
163160
raw_domain = env(env_key)
164161
domain = raw_domain
@@ -170,10 +167,10 @@ def parse_domain(*env_keys: str) -> str:
170167

171168
GO_API_URL = parse_domain("API_FQDN")
172169
GO_WEB_URL = parse_domain("FRONTEND_URL")
173-
# NOTE: Used in local development to get to the frontend service from within go-api container
174-
# GO_WEB_URL will be used if GO_WEB_INTERNAL_URL is not provided
170+
# NOTE: Used in local development to point to the frontend service from within go-api container
171+
# Default to GO_WEB_URL if GO_WEB_INTERNAL_URL is not provided
175172
GO_WEB_INTERNAL_URL = parse_domain("GO_WEB_INTERNAL_URL", "FRONTEND_URL")
176-
FRONTEND_URL = urlparse(GO_WEB_URL).hostname # XXX: Deprecated. Slowly remove this from codebase
173+
FRONTEND_URL = urlparse(GO_WEB_URL).hostname # FIXME: Deprecated. Slowly remove this from codebase
177174

178175
INTERNAL_IPS = ["127.0.0.1"]
179176
if env("DOCKER_HOST_IP"):
@@ -498,7 +495,7 @@ def parse_domain(*env_keys: str) -> str:
498495
"azure_container": "api",
499496
},
500497
},
501-
# TODO: Use this instead of nginx for staticfiles
498+
# FIXME: Use this instead of nginx for staticfiles
502499
# "staticfiles": {
503500
# "BACKEND": "storages.backends.azure_storage.AzureStorage",
504501
# "OPTIONS": {

0 commit comments

Comments
 (0)