1👍
✅
Simply use the mark_safe()
method and you’ll be able to use html.
_.verbose_name = mark_safe("<input type='checkbox'>")
https://docs.djangoproject.com/en/3.2/ref/utils/#django.utils.safestring.mark_safe
Bonus: here’s the code where that happens https://github.com/jieter/django-tables2/blob/e09632ee1cecdc27e826374212594e782bd22fbd/django_tables2/columns/base.py#L690
👤Ben
Source:stackexchange.com