django-autocomplete-light icon indicating copy to clipboard operation
django-autocomplete-light copied to clipboard

Dark mode support

Open al-muammar opened this issue 4 years ago • 8 comments

Django 3.2 introduces dark mode in its admin website. DAL looks very poorly and need to take the same (or similar) styles as django autocomplete.

al-muammar avatar May 11 '21 14:05 al-muammar

Agreed, anyone wants to give it a go in a PR?

jpic avatar May 11 '21 21:05 jpic

Need this please!!!!

axvargas avatar May 19 '21 00:05 axvargas

This would be a very welcome addition.

lguariento avatar Oct 20 '21 16:10 lguariento

I second this... as a hotfix, you can still create a <YOURAPP>/templates/admin/base_site.html and put the following lines in:

{% block extrahead %}
	<style>
		.select2-selection__choice{
			color: #000;
		}
		.select2-results__option {
			color:#000;
		}
	</style>
{% endblock %}

EParisot avatar Nov 13 '21 21:11 EParisot

Tried to fix this dark mode compatibility issue in the PR #1280, it just needed to be reviewed.

ammarCanc avatar Jan 20 '22 07:01 ammarCanc

It still doesn't work for me. What am I missing? Django==4.0.3 django-autocomplete-light==3.9.4

admin add page

image

forms.py

class AdressForm(forms.ModelForm):

    class Meta:
        model = Address
        fields = ('__all__')
        widgets = {
            'city': autocomplete.ModelSelect2(url='city-autocomplete',
                                              forward=['country', 'region'],
                                              attrs = {'data-placeholder': '...',
                                                      }),

            'region': autocomplete.ModelSelect2(url='region-autocomplete',
                                                forward=['country'],
                                                attrs = {'data-placeholder': '...',
                                                        })
        }

Stounik avatar Apr 30 '22 12:04 Stounik

Still no dark mode support in 3.9.4 :(

django==3.2.13

Screenshot 2022-06-08 at 13 42 16

geekkun avatar Jun 08 '22 10:06 geekkun

I opened #1308 to add support for dark mode.

trumpet2012 avatar Sep 21 '22 12:09 trumpet2012