Source code for annotations.templatetags.addcss

from django import template
register = template.Library()


@register.filter(name='addcss')
[docs]def addcss(field, css): return field.as_widget(attrs={"class":css})