diff options
| author | Artem Tabolin <artemtab@yandex.ru> | 2018-03-15 15:55:34 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-03-15 10:56:06 -0400 |
| commit | 9bf8664bfd55c8b8586f94351f7e64cf258717b2 (patch) | |
| tree | 5f41f307466f7f28f15c14b95c1e534278d0b46e /django | |
| parent | 24066cc43005eb6c209fe543e1e8d00f730eb50b (diff) | |
[2.0.x] Fixed #29221 -- Corrected admin's autocomplete widget to add a space after custom classes.
Backport of a2f7433adc610cb0a85b3e23a1fec2267591f866 from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/widgets.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index c69aa78d41..720e52abb0 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -435,7 +435,7 @@ class AutocompleteMixin: 'data-theme': 'admin-autocomplete', 'data-allow-clear': json.dumps(not self.is_required), 'data-placeholder': '', # Allows clearing of the input. - 'class': attrs['class'] + 'admin-autocomplete', + 'class': attrs['class'] + (' ' if attrs['class'] else '') + 'admin-autocomplete', }) return attrs |
