summaryrefslogtreecommitdiff
path: root/django/utils/html.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/html.py')
-rw-r--r--django/utils/html.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/utils/html.py b/django/utils/html.py
index 3ad920aca0..576eabc683 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -130,10 +130,11 @@ def format_html(format_string, *args, **kwargs):
"""
if not (args or kwargs):
# RemovedInDjango60Warning: when the deprecation ends, replace with:
- # raise ValueError("args or kwargs must be provided.")
+ # raise TypeError("args or kwargs must be provided.")
warnings.warn(
"Calling format_html() without passing args or kwargs is deprecated.",
RemovedInDjango60Warning,
+ stacklevel=2,
)
args_safe = map(conditional_escape, args)
kwargs_safe = {k: conditional_escape(v) for (k, v) in kwargs.items()}