summaryrefslogtreecommitdiff
path: root/django/template
diff options
context:
space:
mode:
authorfarhan <farhanalirazaazeemi@gmail.com>2025-09-04 17:05:03 +0500
committerJacob Walls <jacobtylerwalls@gmail.com>2025-09-04 12:14:10 -0400
commit34bd3ed944bf38792c631b55e581963d44d52284 (patch)
tree96e57acecfdd6a567ba81afe7ada7c3c44071a34 /django/template
parent686a8a62ae7faba9c3b17080c3532b821e8cb1f3 (diff)
Refs #36559, #35667 -- Used skip_file_prefixes in PartialTemplate.source warning.
Diffstat (limited to 'django/template')
-rw-r--r--django/template/base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/template/base.py b/django/template/base.py
index 37e7243d5c..b87291746b 100644
--- a/django/template/base.py
+++ b/django/template/base.py
@@ -52,10 +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.formats import localize
from django.utils.html import conditional_escape
@@ -327,7 +329,7 @@ class PartialTemplate:
"PartialTemplate.source is only available when template "
"debugging is enabled.",
RuntimeWarning,
- stacklevel=2,
+ skip_file_prefixes=(os.path.dirname(django.__file__),),
)
return self.find_partial_source(template.source)