django-autocomplete-light displays empty dropdown in the form

只谈情不闲聊 提交于 2019-12-01 06:49:56
Programmingjoe

I was running into the same problem. This was a good reference: django-autocompletion-light simple foreign key completion shows not editable drop-down widget

Make sure you are loading the jquery in your header file and that you use the {{ form.media }} tag for your form.

Here is how I load the jquery in my header file:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>

Also, have you tried going to the tenant-autocomplete/ url to see if you get the results on that page like it is mentioned in the tutorial https://django-autocomplete-light.readthedocs.io/en/master/tutorial.html

If you can't get results from the url that should be the first bug you fix.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!