from django.utils.html import format_html from django.conf import settings from . import models import django_tables2 as tables from django_tables2.utils import A class ImageColumn(tables.Column): def render(self, value): return format_html('', settings.MEDIA_URL, value) class CustomerTable(tables.Table): class Meta: model = models.Customer first_name = tables.Column()