summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Willette <jrwillette88@gmail.com>2016-09-14 02:45:24 +0900
committerTim Graham <timograham@gmail.com>2016-09-13 13:46:01 -0400
commitca825b1779097168545b79c96317da3e1780282c (patch)
tree36cb71ce5571d5c65495ba728bef74038cdea9d1
parent3c9f6eb0c043c44971e33555a2996206b4fa8750 (diff)
[1.10.x] Fixed #27216 -- Corrected import location in admin deprecation messages.
Backport of 7148929a5ef4a5fb8332a43f7d39394618313476 from master
-rw-r--r--django/contrib/admin/helpers.py4
-rw-r--r--django/contrib/admin/templatetags/admin_list.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py
index d5cf38e2ea..4e5ecb6d9b 100644
--- a/django/contrib/admin/helpers.py
+++ b/django/contrib/admin/helpers.py
@@ -213,8 +213,8 @@ class AdminReadonlyField(object):
if getattr(attr, "allow_tags", False):
warnings.warn(
"Deprecated allow_tags attribute used on %s. "
- "Use django.utils.safestring.format_html(), "
- "format_html_join(), or mark_safe() instead." % attr,
+ "Use django.utils.html.format_html(), format_html_join(), "
+ "or django.utils.safestring.mark_safe() instead." % attr,
RemovedInDjango20Warning
)
result_repr = mark_safe(value)
diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
index c8ebccfd25..f67cb795aa 100644
--- a/django/contrib/admin/templatetags/admin_list.py
+++ b/django/contrib/admin/templatetags/admin_list.py
@@ -228,8 +228,8 @@ def items_for_result(cl, result, form):
if allow_tags:
warnings.warn(
"Deprecated allow_tags attribute used on field {}. "
- "Use django.utils.safestring.format_html(), "
- "format_html_join(), or mark_safe() instead.".format(field_name),
+ "Use django.utils.html.format_html(), format_html_join(), "
+ "or django.utils.safestring.mark_safe() instead.".format(field_name),
RemovedInDjango20Warning
)
result_repr = mark_safe(result_repr)