Fixed #27216 -- Corrected import location in admin deprecation messages.

This commit is contained in:
Jeff Willette 2016-09-14 02:45:24 +09:00 committed by Tim Graham
parent 0c1f71635f
commit 7148929a5e
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

@ -229,8 +229,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)