Refactor HTML formatting to use mark_safe for safe rendering in various tables and models
This commit is contained in:
+2
-1
@@ -23,6 +23,7 @@ from django.core.exceptions import ValidationError
|
||||
from django.core.validators import validate_email
|
||||
|
||||
from django.utils.html import format_html
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
# from django.contrib.auth.models import User
|
||||
from django.contrib.auth.decorators import login_required, user_passes_test
|
||||
@@ -1107,7 +1108,7 @@ def accounts_bulk_create(request):
|
||||
except Exception as error:
|
||||
error_text = error_text + f"<p>Error creating users.<br/>{error}</p>"
|
||||
|
||||
context["error"] = format_html(error_text)
|
||||
context["error"] = mark_safe(error_text)
|
||||
context["created_users"] = created_users
|
||||
|
||||
if existing_users:
|
||||
|
||||
Reference in New Issue
Block a user