This pull request includes significant changes to the handling of search settings within the TEKDB application. The main updates involve removing the SearchSettings model and moving its configuration to the Configuration model, along with several related adjustments across the codebase.
Removal of SearchSettings model:
TEKDB/TEKDB/admin.py: Removed SearchSettingsAdmin class and unregistered SearchSettings from the admin site. [1][2]
This pull request includes significant changes to the handling of search settings within the TEKDB application. The main updates involve removing the
SearchSettings
model and moving its configuration to theConfiguration
model, along with several related adjustments across the codebase.Removal of
SearchSettings
model:TEKDB/TEKDB/admin.py
: RemovedSearchSettingsAdmin
class and unregisteredSearchSettings
from the admin site. [1] [2]TEKDB/TEKDB/migrations/0018_delete_searchsettings.py
: Added migration to delete theSearchSettings
model.TEKDB/TEKDB/models.py
: RemovedSearchSettings
model definition.Migration of search settings to
Configuration
model:TEKDB/configuration/admin.py
: Addedmin_search_rank
andmin_search_similarity
fields to theConfigurationAdmin
class.TEKDB/configuration/migrations/0012_auto_20241025_1313.py
: Added migration to includemin_search_rank
andmin_search_similarity
fields in theConfiguration
model.TEKDB/configuration/migrations/0013_auto_20241025_1406.py
: Updated migration to include choices formin_search_rank
andmin_search_similarity
fields.TEKDB/configuration/migrations/0014_auto_20241025_1603.py
: Further updated migration to refine choices formin_search_rank
andmin_search_similarity
fields.TEKDB/configuration/models.py
: Addedmin_search_rank
andmin_search_similarity
fields with choices to theConfiguration
model.Updates to search settings logic:
TEKDB/TEKDB/context_processors.py
: Modifiedsearch_settings
function to handle new configuration logic and fallback mechanisms.TEKDB/TEKDB/models.py
: Updatedrun_keyword_search
function to use the newsearch_settings
function.Configuration changes:
TEKDB/TEKDB/settings.py
: AdjustedMIN_SEARCH_RANK
andMIN_SEARCH_SIMILARITY
default values and addedsearch_settings
context processor. [1] [2]