diff --git a/src/documents/checks.py b/src/documents/checks.py index 2de1572c8..ef6f4e845 100644 --- a/src/documents/checks.py +++ b/src/documents/checks.py @@ -9,7 +9,7 @@ from django.db.utils import OperationalError from django.db.utils import ProgrammingError from documents.signals import document_consumer_declaration -from documents.templatetags import convert_to_django_template_format +from documents.templatetags.filepath import convert_to_django_template_format @register() diff --git a/src/documents/file_handling.py b/src/documents/file_handling.py index eb1397f7d..1b0baf0d4 100644 --- a/src/documents/file_handling.py +++ b/src/documents/file_handling.py @@ -17,7 +17,7 @@ from documents.models import Document from documents.models import DocumentType from documents.models import StoragePath from documents.models import Tag -from documents.templatetags import convert_to_django_template_format +from documents.templatetags.filepath import convert_to_django_template_format logger = logging.getLogger("paperless.filehandling") @@ -26,7 +26,7 @@ INVALID_VARIABLE_STR = "InvalidVarError" filepath_engine = Engine( autoescape=False, string_if_invalid=f"{INVALID_VARIABLE_STR}: %s", - libraries={"filepath": "documents.templatetags"}, + libraries={"filepath": "documents.templatetags.filepath"}, ) diff --git a/src/documents/migrations/1055_alter_storagepath_path.py b/src/documents/migrations/1055_alter_storagepath_path.py index ca3d05d41..134a26c7f 100644 --- a/src/documents/migrations/1055_alter_storagepath_path.py +++ b/src/documents/migrations/1055_alter_storagepath_path.py @@ -10,7 +10,7 @@ def convert_from_format_to_template(apps, schema_editor): StoragePath = apps.get_model("documents", "StoragePath") - from documents.templatetags import convert_to_django_template_format + from documents.templatetags.filepath import convert_to_django_template_format with transaction.atomic(): for storage_path in StoragePath.objects.all(): diff --git a/src/documents/templatetags/__init__.py b/src/documents/templatetags/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/documents/templatetags.py b/src/documents/templatetags/filepath.py similarity index 100% rename from src/documents/templatetags.py rename to src/documents/templatetags/filepath.py