-
Notifications
You must be signed in to change notification settings - Fork 49
Remove warnings about autocreated index fields #791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: qa/0.x
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - **Default:** `None` | |
| - **Default:** `""` |
Removes models.W042 warning when running manage.py commands
Connected to archivematica/Issues#1759