diff --git a/ReferenceDataApp/js_views.py b/ReferenceDataApp/js_views.py index f2fc67b..d1d1160 100644 --- a/ReferenceDataApp/js_views.py +++ b/ReferenceDataApp/js_views.py @@ -41,8 +41,11 @@ def get_address_point_ajax(request): res_data = search_cities_in_db(data['search_str']) res_data_str_list = [] + i = 0 for item in res_data: + item['index'] = i res_data_str_list.append(render_to_string('widgets/w_ac_input_address_point.html', item)) + i += 1 res_Dict = { 'res_search_list': res_data_str_list diff --git a/templates/widgets/w_ac_input_address_point.html b/templates/widgets/w_ac_input_address_point.html index 6b042a8..1a4cbf9 100644 --- a/templates/widgets/w_ac_input_address_point.html +++ b/templates/widgets/w_ac_input_address_point.html @@ -1,9 +1,4 @@ -
-
- -
-
+
+
{{ iata_code }} - {{ name }}
+
{{ city__name }}, {{ city__country__name }}
\ No newline at end of file