summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--jthanio/settings/base.py9
2 files changed, 10 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index c3fbfe9..9e975df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -141,3 +141,4 @@ dmypy.json
# Compiled Assets
media
+search_index/
diff --git a/jthanio/settings/base.py b/jthanio/settings/base.py
index 44c52e7..be8cd28 100644
--- a/jthanio/settings/base.py
+++ b/jthanio/settings/base.py
@@ -163,3 +163,12 @@ WAGTAIL_SITE_NAME = "jthanio"
# Base URL to use when referring to full URLs within the Wagtail admin backend -
# e.g. in notification emails. Don't include '/admin' or a trailing slash
BASE_URL = 'https://jthan.io'
+
+ROOT_DIR = os.path.abspath(os.path.dirname(__name__))
+WAGTAILSEARCH_BACKENDS = {
+ 'default': {
+ 'BACKEND': 'wagtail_whoosh.backend',
+ 'PATH': os.path.join(ROOT_DIR, 'search_index'),
+ 'LANGUAGE': 'en',
+ },
+}