registration.py's register accepts an auto_indexing keyword (definition). Unfortunately, setting it to False has no effect as:
the AUTO_INDEXING setting is initially read; if it's absent, the internal variable __auto_indexing is set to a default of True
an incorrect check is made here: either the auto_indexing is a bool and its value is True OR self.__auto_indexing is True. Since self.__auto_indexing is True by default, passing auto_indexing=False to register does not do anything.
Steps To Reproduce
do not set the AUTO_INDEXING setting
use code similar to:
# index.py
from algoliasearch_django import register, AlgoliaIndex
from models import MyModel
class MyModelIndex(AlgoliaIndex):
# ...
register(MyModel, MyModelIndex, auto_indexing=False)
# somewhere else
m = MyModel()
m.save()
# at this point, __post_save_receiver gets called
Description
registration.py
'sregister
accepts anauto_indexing
keyword (definition). Unfortunately, setting it toFalse
has no effect as:AUTO_INDEXING
setting is initially read; if it's absent, the internal variable__auto_indexing
is set to a default ofTrue
auto_indexing
is a bool and its value isTrue
ORself.__auto_indexing
isTrue
. Sinceself.__auto_indexing
isTrue
by default, passingauto_indexing=False
toregister
does not do anything.Steps To Reproduce
AUTO_INDEXING
setting