diff options
| author | Adam Johnson <me@adamj.eu> | 2025-09-12 09:35:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-12 10:35:01 +0200 |
| commit | 7b26b64a63b5fc15134426a6ee0534dca2a1a855 (patch) | |
| tree | d9b4adfe485e3de352269e1fc7dd13d25875054d /django/template | |
| parent | 41bc48ac1ed1d515977ebe965993b1ef83eafd02 (diff) | |
Refs #35667 -- Cached Django file prefixes for warnings.
Diffstat (limited to 'django/template')
| -rw-r--r-- | django/template/base.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/template/base.py b/django/template/base.py index b87291746b..5e541c3960 100644 --- a/django/template/base.py +++ b/django/template/base.py @@ -52,13 +52,12 @@ times with multiple contexts) import inspect import logging -import os import re import warnings from enum import Enum -import django from django.template.context import BaseContext +from django.utils.deprecation import django_file_prefixes from django.utils.formats import localize from django.utils.html import conditional_escape from django.utils.regex_helper import _lazy_re_compile @@ -329,7 +328,7 @@ class PartialTemplate: "PartialTemplate.source is only available when template " "debugging is enabled.", RuntimeWarning, - skip_file_prefixes=(os.path.dirname(django.__file__),), + skip_file_prefixes=django_file_prefixes(), ) return self.find_partial_source(template.source) |
