Skip to content

Commit

Permalink
Merge pull request #229 from PetrDlouhy/fix_css_class
Browse files Browse the repository at this point in the history
Get css_class from self - fixes integration with django-crispy-forms
  • Loading branch information
blag authored Dec 12, 2017
2 parents fe2bb88 + 1fb0639 commit e7fe61b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions smart_selects/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def render(self, name, value, attrs=None, choices=()): # noqa: C901
final_choices.append(ch)
self.choices = final_choices

attrs.update(self.attrs)
attrs["data-chainfield"] = chained_field
attrs["data-url"] = url
attrs["data-value"] = "null" if value is None or value == "" else value
Expand Down

0 comments on commit e7fe61b

Please sign in to comment.