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):
|
if getattr(attr, "allow_tags", False):
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Deprecated allow_tags attribute used on %s. "
|
"Deprecated allow_tags attribute used on %s. "
|
||||||
"Use django.utils.safestring.format_html(), "
|
"Use django.utils.html.format_html(), format_html_join(), "
|
||||||
"format_html_join(), or mark_safe() instead." % attr,
|
"or django.utils.safestring.mark_safe() instead." % attr,
|
||||||
RemovedInDjango20Warning
|
RemovedInDjango20Warning
|
||||||
)
|
)
|
||||||
result_repr = mark_safe(value)
|
result_repr = mark_safe(value)
|
||||||
|
|
|
@ -229,8 +229,8 @@ def items_for_result(cl, result, form):
|
||||||
if allow_tags:
|
if allow_tags:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Deprecated allow_tags attribute used on field {}. "
|
"Deprecated allow_tags attribute used on field {}. "
|
||||||
"Use django.utils.safestring.format_html(), "
|
"Use django.utils.html.format_html(), format_html_join(), "
|
||||||
"format_html_join(), or mark_safe() instead.".format(field_name),
|
"or django.utils.safestring.mark_safe() instead.".format(field_name),
|
||||||
RemovedInDjango20Warning
|
RemovedInDjango20Warning
|
||||||
)
|
)
|
||||||
result_repr = mark_safe(result_repr)
|
result_repr = mark_safe(result_repr)
|
||||||
|
|
Loading…
Reference in New Issue