diff --git a/src/documents/checks.py b/src/documents/checks.py index 41f836882..2de1572c8 100644 --- a/src/documents/checks.py +++ b/src/documents/checks.py @@ -2,6 +2,7 @@ import textwrap from django.conf import settings from django.core.checks import Error +from django.core.checks import Warning from django.core.checks import register from django.core.exceptions import FieldError from django.db.utils import OperationalError @@ -78,7 +79,7 @@ def filename_format_check(app_configs, **kwargs): converted_format = convert_to_django_template_format(settings.FILENAME_FORMAT) if converted_format != settings.FILENAME_FORMAT: return [ - Error( + Warning( f"Filename format {settings.FILENAME_FORMAT} is using the old style, please update to use double curly brackets", hint=converted_format, ), diff --git a/src/documents/tests/test_checks.py b/src/documents/tests/test_checks.py index 4288f69f1..4af05746f 100644 --- a/src/documents/tests/test_checks.py +++ b/src/documents/tests/test_checks.py @@ -2,6 +2,7 @@ import textwrap from unittest import mock from django.core.checks import Error +from django.core.checks import Warning from django.test import TestCase from django.test import override_settings @@ -82,7 +83,7 @@ class TestDocumentChecks(TestCase): self.assertEqual( filename_format_check(None), [ - Error( + Warning( "Filename format {created}/{title} is using the old style, please update to use double curly brackets", hint="{{ created }}/{{ title }}", ),