Skip to content

Commit fad99d6

Browse files
committed
Add SS_SILENCED_SYSTEM_CHECKS environment var
Based on https://docs.djangoproject.com/en/4.2/ref/settings/#silenced-system-checks
1 parent 8909bc5 commit fad99d6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

install/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ of these settings or provide values to mandatory fields.
223223
- **Type:** `integer`
224224
- **Default:** `900`
225225

226+
- **`SS_SILENCED_SYSTEM_CHECKS`**:
227+
- **Description:** comma-separated list of ignored system checks.
228+
e.g. mysql.W002,models.W042
229+
- **Type:** `string`
230+
- **Default:** `None`
231+
226232
The configuration of the database is also declared via environment variables.
227233
Storage Service looks up the `SS_DB_URL` environment string. If defined, its
228234
value is expected to follow the form described in the [dj-database-url docs],

src/archivematica/storage_service/storage_service/settings/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,3 +754,5 @@ def _get_email(email):
754754
)
755755
INSTALLED_APPS = INSTALLED_APPS + ["django_prometheus"]
756756
LOGIN_EXEMPT_URLS.append(r"^metrics$")
757+
758+
SILENCED_SYSTEM_CHECKS = environ.get("SS_SILENCED_SYSTEM_CHECKS", "[]")

src/archivematica/storage_service/storage_service/settings/production.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,3 @@
7979
# Note: This key should only be used for development and testing.
8080
SECRET_KEY = get_env_variable("DJANGO_SECRET_KEY")
8181
# ######## END SECRET CONFIGURATION
82-
83-
# Remove warning about autocreated primary keys.
84-
SILENCED_SYSTEM_CHECKS = ["models.W042"]

0 commit comments

Comments
 (0)