File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import unicode_literals
2
2
import logging
3
3
4
+ from django import __version__ as __django__version__
4
5
from django .db .models .signals import post_save
5
6
from django .db .models .signals import pre_delete
7
+ from algoliasearch_django import __version__
6
8
from algoliasearch .search .client import SearchClientSync
7
9
8
10
from .models import AlgoliaIndex
@@ -34,8 +36,8 @@ def __init__(self, settings=SETTINGS):
34
36
35
37
self .__registered_models = {}
36
38
self .client = SearchClientSync (app_id , api_key )
37
- self .client .add_user_agent ("Algolia for Django" , VERSION )
38
- self .client .add_user_agent ("Django" , django_version () )
39
+ self .client .add_user_agent ("Algolia for Django" , __version__ )
40
+ self .client .add_user_agent ("Django" , __django__version__ )
39
41
40
42
def is_registered (self , model ):
41
43
"""Checks whether the given models is registered with Algolia engine"""
Original file line number Diff line number Diff line change @@ -303,7 +303,9 @@ class WebsiteIndex(AlgoliaIndex):
303
303
"word" : "Street" ,
304
304
"corrections" : ["St" ],
305
305
}
306
- save_synonyms_response = self .client .save_synonyms (self .index .index_name , synonym_hit = [synonym ])
306
+ save_synonyms_response = self .client .save_synonyms (
307
+ self .index .index_name , synonym_hit = [synonym ]
308
+ )
307
309
self .client .wait_for_task (self .index .index_name , save_synonyms_response .task_id )
308
310
309
311
# When reindexing with no settings on the instance
You can’t perform that action at this time.
0 commit comments