Fixed #27216 -- Corrected import location in admin deprecation messages.
This commit is contained in:
parent
0c1f71635f
commit
7148929a5e
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue