Remove warnings about autocreated index fields#791
Conversation
a41a5f6 to
a33d937
Compare
| LOGIN_EXEMPT_URLS.append(r"^metrics$") | ||
|
|
||
| # Remove models.W042 warning | ||
| DEFAULT_AUTO_FIELD = "django.db.models.AutoField" |
There was a problem hiding this comment.
Removes models.W042 warning when running manage.py commands
This removes the warnings about autocreated primary keys
a33d937 to
8909bc5
Compare
|
@replaceafill , I removed the defalt_auto_field and used systemd_silence_checks only for production. Does this look better? |
|
@scollazo I think instead of hardcoding the setting value we should expose the |
|
Done! |
de37cbb to
fad99d6
Compare
| - **Type:** `integer` | ||
| - **Default:** `900` | ||
|
|
||
| - **`SS_SILENCED_SYSTEM_CHECKS`**: |
There was a problem hiding this comment.
What do you think of dropping SS_ prefix? We are not really consistent but most of the Django related variables don't have it. Also could we move this documentation bit after the SECRET_KEY variable?
| - **Description:** comma-separated list of ignored system checks. | ||
| e.g. mysql.W002,models.W042 |
There was a problem hiding this comment.
Let's add a link to https://docs.djangoproject.com/en/4.2/ref/settings/#silenced-system-checks here. See examples in TIME_ZONE or SECRET_KEY above.
| INSTALLED_APPS = INSTALLED_APPS + ["django_prometheus"] | ||
| LOGIN_EXEMPT_URLS.append(r"^metrics$") | ||
|
|
||
| SILENCED_SYSTEM_CHECKS = environ.get("SS_SILENCED_SYSTEM_CHECKS", "[]") |
There was a problem hiding this comment.
If you're expecting the user to set a comma separated list it needs to be converted to a list here:
| SILENCED_SYSTEM_CHECKS = environ.get("SS_SILENCED_SYSTEM_CHECKS", "[]") | |
| SILENCED_SYSTEM_CHECKS = environ.get("SS_SILENCED_SYSTEM_CHECKS", "").split(",") |
| - **Description:** comma-separated list of ignored system checks. | ||
| e.g. mysql.W002,models.W042 | ||
| - **Type:** `string` | ||
| - **Default:** `None` |
There was a problem hiding this comment.
| - **Default:** `None` | |
| - **Default:** `""` |
Removes models.W042 warning when running manage.py commands
Connected to archivematica/Issues#1759