Skip to content

Commit

Permalink
Config fix on embeddings
Browse files Browse the repository at this point in the history
Only enable when the analyzer is enabled
  • Loading branch information
davidfischer committed Mar 20, 2024
1 parent f75e5a4 commit eefd4bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .envs/local/django.sample
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ COLUMNS=80
# Analyzer
# ------------------------------------------------------------------------------
# See ``adserver.analyzer.backends`` for available backends
# ADSERVER_ANALYZER_BACKEND="adserver.analyzer.backends.TextacyAnalyzerBackend,adserver.analyzer.backends.SentenceTransformerAnalyzerBackend"
# ADSERVER_ANALYZER_BACKEND=
5 changes: 2 additions & 3 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@
"corsheaders",
]

if ext:
INSTALLED_APPS.append("ethicalads_ext.embedding")

MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"enforce_host.EnforceHostMiddleware",
Expand Down Expand Up @@ -526,6 +523,8 @@
)
if ADSERVER_ANALYZER_BACKEND:
INSTALLED_APPS.append("adserver.analyzer")
if ADSERVER_ANALYZER_BACKEND and ext:
INSTALLED_APPS.append("ethicalads_ext.embedding")

# Whether Do Not Track is enabled for the ad server
ADSERVER_DO_NOT_TRACK = False
Expand Down

0 comments on commit eefd4bf

Please sign in to comment.