From f2e58ec1ffec23cc860667fbdee2accf780e8818 Mon Sep 17 00:00:00 2001 From: Matt Frazier Date: Wed, 18 Sep 2024 13:26:00 -0400 Subject: [PATCH 1/2] Remove calls to mark_safe --- admin/base/filters.py | 3 +-- admin/base/templatetags/filters.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/admin/base/filters.py b/admin/base/filters.py index 19ba7fb8bce..f0107e9cc3c 100644 --- a/admin/base/filters.py +++ b/admin/base/filters.py @@ -1,5 +1,4 @@ from django import template -from django.utils.safestring import mark_safe import json @@ -8,4 +7,4 @@ @register.filter def jsonify(o): - return mark_safe(json.dumps(o)) + return json.dumps(o) diff --git a/admin/base/templatetags/filters.py b/admin/base/templatetags/filters.py index a3a72b9cd4a..38efad3a0fe 100644 --- a/admin/base/templatetags/filters.py +++ b/admin/base/templatetags/filters.py @@ -1,10 +1,9 @@ # h/t https://djangosnippets.org/snippets/1250/ from django import template -from django.utils.safestring import mark_safe import json register = template.Library() @register.filter def jsonify(o): - return mark_safe(json.dumps(o)) + return json.dumps(o) From 4eefa5221aa2ea6efb4d15a5cd1ef1e9eb4f8eea Mon Sep 17 00:00:00 2001 From: Matt Frazier Date: Wed, 18 Sep 2024 15:27:03 -0400 Subject: [PATCH 2/2] Clean up local-ci --- .github/workflows/test-build.yml | 10 +++++----- api/base/settings/local-ci.py | 2 +- website/settings/local-ci.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 42f264772ac..b8ac8c6ad5b 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -39,7 +39,7 @@ jobs: postgres: image: postgres env: - POSTGRES_PASSWORD: postgres + POSTGRES_PASSWORD: ${{ env.OSF_DB_PASSWORD }} options: >- --health-cmd pg_isready --health-interval 10s @@ -66,7 +66,7 @@ jobs: postgres: image: postgres env: - POSTGRES_PASSWORD: postgres + POSTGRES_PASSWORD: ${{ env.OSF_DB_PASSWORD }} options: >- --health-cmd pg_isready --health-interval 10s @@ -93,7 +93,7 @@ jobs: postgres: image: postgres env: - POSTGRES_PASSWORD: postgres + POSTGRES_PASSWORD: ${{ env.OSF_DB_PASSWORD }} options: >- --health-cmd pg_isready --health-interval 10s @@ -122,7 +122,7 @@ jobs: postgres: image: postgres env: - POSTGRES_PASSWORD: postgres + POSTGRES_PASSWORD: ${{ env.OSF_DB_PASSWORD }} options: >- --health-cmd pg_isready --health-interval 10s @@ -150,7 +150,7 @@ jobs: image: postgres env: - POSTGRES_PASSWORD: postgres + POSTGRES_PASSWORD: ${{ env.OSF_DB_PASSWORD }} options: >- --health-cmd pg_isready --health-interval 10s diff --git a/api/base/settings/local-ci.py b/api/base/settings/local-ci.py index 159ff9a777f..5dc5d6035f4 100644 --- a/api/base/settings/local-ci.py +++ b/api/base/settings/local-ci.py @@ -5,7 +5,7 @@ ENABLE_VARNISH = True ENABLE_ESI = False -OSF_DB_PASSWORD = 'postgres' +OSF_DB_PASSWORD = os.environ.get('OSF_DB_PASSWORD') SESSION_ENGINE = 'django.contrib.sessions.backends.db' diff --git a/website/settings/local-ci.py b/website/settings/local-ci.py index 0f3174f3ba9..582541525a9 100644 --- a/website/settings/local-ci.py +++ b/website/settings/local-ci.py @@ -10,7 +10,7 @@ import os DB_PORT = 5432 -OSF_DB_PASSWORD = 'postgres' +OSF_DB_PASSWORD = os.environ.get('OSF_DB_PASSWORD') DEV_MODE = True DEBUG_MODE = True # Sets app to debug mode, turns off template caching, etc.