File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 33from django .contrib import admin , messages
44from django .contrib .auth .admin import UserAdmin
55from django .contrib .auth .models import Group , User
6- from django .utils .html import format_html
6+ from django .utils .html import mark_safe
77from django_admin_relation_links import AdminChangeLinksMixin
88from rest_framework .authtoken .admin import TokenAdmin
99from rest_framework .authtoken .models import TokenProxy
@@ -131,10 +131,10 @@ class OrderAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
131131
132132 def _logs (self , obj ):
133133 if not obj .logs :
134- return format_html ("<b>No logs were recorded</b>" )
134+ return mark_safe ("<b>No logs were recorded</b>" )
135135 with_hyperlinks = objects_to_hyperlinks (obj .logs )
136136 try :
137- html_logs = format_html (
137+ html_logs = mark_safe (
138138 f'<table style="width: 100%">{ with_hyperlinks } </table>'
139139 )
140140 except Exception as e :
You can’t perform that action at this time.
0 commit comments