From d0951300e9f48c06f6092ac1bae0b66ec2dafe1e Mon Sep 17 00:00:00 2001 From: Micah Beasley Date: Fri, 8 May 2020 13:29:12 -0500 Subject: [PATCH] Add format_html import to prevent NameError When building a render_foo() failing to import format_html will cause: > NameError: name 'format_html' is not defined --- docs/pages/custom-data.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/custom-data.rst b/docs/pages/custom-data.rst index 4306dabb..c7cde7c1 100644 --- a/docs/pages/custom-data.rst +++ b/docs/pages/custom-data.rst @@ -95,6 +95,7 @@ the `last_name` column:: # tables.py from .models import Customers + from django.utils.html import format_html class CustomerTable(tables.Table): name = tables.Column()