Skip to content

Commit 299ad9e

Browse files
committed
fix: log static settings
1 parent 243ae0f commit 299ad9e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

api/urls.py

+20
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,26 @@
3939
basename="contributor",
4040
)
4141

42+
# TODO: delete this after finish testing
43+
# pylint: disable=wrong-import-position, wrong-import-order,ungrouped-imports
44+
import logging
45+
46+
from codeforlife.views import HealthCheckView as _HealthCheckView
47+
from django.conf import settings
48+
49+
50+
# pylint: disable-next=missing-class-docstring
51+
class HealthCheckView(_HealthCheckView):
52+
def get_health_check(self, request):
53+
# pylint: disable-next=logging-fstring-interpolation
54+
logging.warning(
55+
f"STATIC_ROOT: {settings.STATIC_ROOT}."
56+
f" STATIC_URL: {settings.STATIC_URL}."
57+
f" AWS_STORAGE_BUCKET_NAME: {settings.AWS_STORAGE_BUCKET_NAME}."
58+
)
59+
return super().get_health_check(request)
60+
61+
4262
urlpatterns = get_urlpatterns(
4363
[
4464
*router.urls,

0 commit comments

Comments
 (0)