Commit e00b840f authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[ui][registration][templatetags] Pre-commit cleanup

parent 72572d10
......@@ -27,15 +27,18 @@
from django import template
register = template.Library()
@register.filter
def tabindex(value, index):
"""Add a tabindex attribute to the widget for a bound field."""
value.field.widget.attrs['tabindex'] = index
value.field.widget.attrs["tabindex"] = index
return value
@register.filter(name='addclass')
@register.filter(name="addclass")
def addclass(field, kls):
"""Adds a class to the widget"""
return field.as_widget(attrs={"class":kls})
"""Adds a class to the widget"""
return field.as_widget(attrs={"class": kls})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment