Skip to content

Commit

Permalink
Don't overrride default widget classes
Browse files Browse the repository at this point in the history
  • Loading branch information
nanuxbe committed Nov 26, 2014
1 parent eda0a8e commit ff5044b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@


def css_classes_for_field(field, custom_classes):
orig_class = field.field.widget.attrs.get('class', '')
required = 'required' if field.field.required else ''
classes = field.css_classes('{} {}'.format(custom_classes, required))
classes = field.css_classes(' '.join([orig_class, custom_classes, required]))
return classes


Expand Down

0 comments on commit ff5044b

Please sign in to comment.