django-autocomplete-light error = 'list' object has no attribute 'queryset'

后端 未结 3 1307
忘了有多久
忘了有多久 2021-01-03 10:29

i am new on django and i need your help, trying since many days to understand django-autocomplete-light, after setup my test, http://192.168.0.108:8000/country-autocomplete/

3条回答
  •  囚心锁ツ
    2021-01-03 10:41

    I you create the widget in __init__(), then this work-around of issue #790 helps:

    form.fields['name'].widget.choices = form.fields['name'].choices
    

提交回复
热议问题