Skip to content

Commit 71e244d

Browse files
fix(ua): Add Python version and django version
1 parent b134c00 commit 71e244d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

algoliasearch_django/registration.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from .models import AlgoliaIndex
99
from .settings import SETTINGS
1010
from .version import VERSION
11+
from algoliasearch.version import VERSION as CLIENT_VERSION
12+
from platform import python_version
1113

1214
logger = logging.getLogger(__name__)
1315

@@ -37,7 +39,8 @@ def __init__(self, settings=SETTINGS):
3739
self.__registered_models = {}
3840
self.client = algoliasearch.Client(app_id, api_key)
3941
self.client.set_extra_header('User-Agent',
40-
'Algolia for Django {}'.format(VERSION))
42+
'Algolia for Python (%s); Python (%s); Algolia for Django (%s)'
43+
% (CLIENT_VERSION, python_version(), VERSION))
4144

4245
def is_registered(self, model):
4346
"""Checks whether the given models is registered with Algolia engine"""

0 commit comments

Comments
 (0)