Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-autocomplete-multi-models
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub
django-autocomplete-multi-models
Commits
ab46003c
Commit
ab46003c
authored
2 years ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
when AUTO_UPDATE_ENABLED is not enabled, make the index as needed to be rebuilt
parent
3ffaff08
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
autocomplete_multi_models/signals.py
+3
-1
3 additions, 1 deletion
autocomplete_multi_models/signals.py
setup.cfg
+1
-1
1 addition, 1 deletion
setup.cfg
with
4 additions
and
2 deletions
autocomplete_multi_models/signals.py
+
3
−
1
View file @
ab46003c
...
@@ -2,8 +2,10 @@ from autocomplete_multi_models import business_process, utils
...
@@ -2,8 +2,10 @@ from autocomplete_multi_models import business_process, utils
def
instance_update
(
sender
,
instance
,
field_names
,
**
kwargs
):
def
instance_update
(
sender
,
instance
,
field_names
,
**
kwargs
):
if
business_process
.
get_setting_from_storage
(
utils
.
AUTO_UPDATE_ENABLED
,
True
)
:
if
business_process
.
get_setting_from_storage
(
utils
.
AUTO_UPDATE_ENABLED
,
"
True
"
)
==
"
True
"
:
business_process
.
add_instance_to_index
(
instance
,
field_names
)
business_process
.
add_instance_to_index
(
instance
,
field_names
)
else
:
business_process
.
set_setting_in_storage
(
utils
.
REBUILD_NEEDED
,
True
)
def
instance_delete
(
sender
,
instance
,
field_names
,
**
kwargs
):
def
instance_delete
(
sender
,
instance
,
field_names
,
**
kwargs
):
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
1
−
1
View file @
ab46003c
[metadata]
[metadata]
name
=
autocomplete-multi-models
name
=
autocomplete-multi-models
version
=
0.5
version
=
0.5
.1
description
=
An app that index fields across multiple models, and expose an api to query for word similar to the query.
description
=
An app that index fields across multiple models, and expose an api to query for word similar to the query.
long_description
=
file: README.md
long_description
=
file: README.md
author
=
Bryan Brancotte
author
=
Bryan Brancotte
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment