Skip to content

Commit

Permalink
Add css support for Django admin
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Mar 29, 2021
1 parent dc91f03 commit b1b229f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include django_select2/static/django_select2/django_select2.js
include django_select2/static/django_select2/django_select2.css
prune tests
prune .github
exclude .fussyfox.yml
Expand Down
2 changes: 1 addition & 1 deletion django_select2/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _get_media(self):

return forms.Media(
js=select2_js + i18n_file + ("django_select2/django_select2.js",),
css={"screen": select2_css},
css={"screen": select2_css + ("django_select2/django_select2.css",)},
)

media = property(_get_media)
Expand Down
3 changes: 3 additions & 0 deletions django_select2/static/django_select2/django_select2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.change-form select.django-select2 {
width: 20em;
}

0 comments on commit b1b229f

Please sign in to comment.