changing syntax of widget.attrs checking to conform to flake test

This commit is contained in:
Daniel Ryan 2014-09-15 11:19:29 -04:00
parent fe4875108d
commit dd63cc8967

View File

@ -162,7 +162,7 @@ class Field(object):
attrs = {}
if 'id' not in self.widget.attrs:
attrs['id'] = self._name
if not 'class' in self.widget.attrs:
if 'class' not in self.widget.attrs:
attrs['class'] = 'form-control'
elif attrs['class'].find('form-control') == -1:
attrs['class'] += ' form-control'