Skip to content

Commit

Permalink
properly set CSS classes on file inputs - fixes pinax#25
Browse files Browse the repository at this point in the history
  • Loading branch information
michzimny committed Aug 16, 2017
1 parent 75ed135 commit 7d5e794
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_forms_bootstrap/templatetags/bootstrap_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
def _preprocess_fields(form):
for field in form.fields:
name = form.fields[field].widget.__class__.__name__.lower()
if not name.startswith("radio") and not name.startswith("checkbox"):
if not name.startswith("radio") and not name.startswith("checkbox") and not name.endswith('fileinput'):
try:
form.fields[field].widget.attrs["class"] += " form-control"
except KeyError:
Expand Down

0 comments on commit 7d5e794

Please sign in to comment.