Moves this to the more standard Django location

This commit is contained in:
Trenton H 2024-10-03 10:14:58 -07:00
parent 6d1f9b0e0c
commit 6d8ffa3382
5 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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"},
)

View File

@ -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():

View File