0

before python 2.7 code for autocomplete works fine, but after python3 autocomplete dont work as it is, everytime i visit the page the field is always blank and the select2 is not fount everytime I check in google chrome network

<link href="{% static 'autocomplete_light/vendor/select2/dist/css/select2.css' %}" type="text/css" media="all" rel="stylesheet" />
<link href="{% static 'autocomplete_light/select2.css' %}" type="text/css" media="all" rel="stylesheet" />
<script type="text/javascript" src="{% static 'autocomplete_light/jquery.init.js' %}"></script>
<script type="text/javascript" src="{% static 'autocomplete_light/autocomplete.init.js' %}"></script>
<script type="text/javascript" src="{% static 'autocomplete_light/vendor/select2/dist/js/select2.full.js' %}"></script>
<script type="text/javascript" src="{% static 'autocomplete_light/select2.js' %}"></script>
<script type="text/javascript">

forms.py

        widgets = {
            'tags': autocomplete.ModelSelect2Multiple(url='tags_autocomplete'),

        }

thanks

denmg
  • 360
  • 3
  • 12

1 Answers1

0

I found an answer in this django-autocomplete-light displays empty dropdown in the form I just added {{ form.media }} on the header an it work

denmg
  • 360
  • 3
  • 12