I eventually figured out how to solve this problem, but did not update this answer. But since I have received comments, I think I should share whatever I know. I don't exactly remember what did I do write so that it started working correctly, but I will share all the settings that I have made in my files, and hope it works for others as well
Firstly I installed django-ajax-selects for the autocomplete field. here is the link for the app https://github.com/crucialfelix/django-ajax-selects
After having installed in project you need these specific settings in the settings file
POSTMAN_AUTOCOMPLETER_APP = { {% if is_autocompleted %}
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.autocomplete.min.js"></script>
<link href="{{ STATIC_URL }}css/jquery.autocomplete.css" type="text/css" media="all" rel="stylesheet" />
{% endif %}
'name': 'ajax_select',
'field': 'AutoCompleteField',
'arg_name': 'channel',
'arg_default': 'user', # no default, mandatory to enable the feature
}
AJAX_SELECT_BOOTSTRAP = True
AJAX_SELECT_INLINES = 'inline'
AJAX_LOOKUP_CHANNELS = {
# pass a dict with the model and the field to search against
'user' : {'model':'auth.user', 'search_field':'username'},
}
You need to include the jquery autocomplete file in your template. Now this library has been integrated with jquery ui so make sure that you use the old jquery autocomplete js file. This could potentially be one of the reasons for it not working.
{% if is_autocompleted %}
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.autocomplete.min.js"></script>
<link href="{{ STATIC_URL }}css/jquery.autocomplete.css" type="text/css" media="all" rel="stylesheet" />
{% endif %}
As I said, I don't exactly remember what I did, such that the app started working but these are all the settings that exist in my project.
Thanks