Skip to content

Commit 7d5e794

Browse files
committed
properly set CSS classes on file inputs - fixes #25
1 parent 75ed135 commit 7d5e794

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_forms_bootstrap/templatetags/bootstrap_tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
def _preprocess_fields(form):
1717
for field in form.fields:
1818
name = form.fields[field].widget.__class__.__name__.lower()
19-
if not name.startswith("radio") and not name.startswith("checkbox"):
19+
if not name.startswith("radio") and not name.startswith("checkbox") and not name.endswith('fileinput'):
2020
try:
2121
form.fields[field].widget.attrs["class"] += " form-control"
2222
except KeyError:

0 commit comments

Comments
 (0)