[1.10.x] Fixed #27216 -- Corrected import location in admin deprecation messages.

Backport of 7148929a5e from master
This commit is contained in:
Jeff Willette 2016-09-14 02:45:24 +09:00 committed by Tim Graham
parent 3c9f6eb0c0
commit ca825b1779
2 changed files with 4 additions and 4 deletions

View File

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

View File

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