1 from django import forms
2 from django.forms.util import flatatt
3 from django.utils.html import format_html
5 class HeaderWidget(forms.widgets.Widget):
6 def render(self, name, value, attrs=None):
8 attrs.update(self.attrs)
9 return format_html('<div{0}>{1}</div>', flatatt(attrs), unicode(value))