In my tables.py file where I defined the tables:
from django.utils.safestring import mark_safe
then, when you return the value for the cell/column use :
return mark_safe(value)
Example below
class SummaryStatus(tables.Column):
def render(self, value):
if "Timed Out" in value:
self.attrs = {"td": {"class": "danger"}}
elif "UP" in value:
self.attrs = {"td": {"class": "success"}}
else:
self.attrs = {"td": {"class": ""}}
return mark_safe(value)