Skip to content

Commit 93cc7e7

Browse files
committed
Minimal changes to the example project to allow test use
1 parent 7bd3a67 commit 93cc7e7

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

example_project/settings.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44

55
import os
66

7+
from django.conf import settings
8+
9+
SECRET_KEY = 'CHANGE ME'
10+
711
# All the normal settings apply. What's included here are the bits you'll have
812
# to customize.
913

1014
# Add Haystack to INSTALLED_APPS. You can do this by simply placing in your list.
11-
INSTALLED_APPS = INSTALLED_APPS + [
15+
INSTALLED_APPS = settings.INSTALLED_APPS + (
1216
'haystack',
13-
]
17+
)
1418

1519

1620
HAYSTACK_CONNECTIONS = {
@@ -21,6 +25,11 @@
2125
'TIMEOUT': 60 * 5,
2226
'INCLUDE_SPELLING': True,
2327
},
28+
'elasticsearch': {
29+
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
30+
'URL': 'http://localhost:9200',
31+
'INDEX_NAME': 'example_project'
32+
},
2433
'whoosh': {
2534
# For Whoosh:
2635
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
@@ -31,9 +40,9 @@
3140
# For Simple:
3241
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
3342
},
34-
'xapian': {
35-
# For Xapian (requires the third-party install):
36-
'ENGINE': 'xapian_backend.XapianEngine',
37-
'PATH': os.path.join(os.path.dirname(__file__), 'xapian_index'),
38-
}
43+
# 'xapian': {
44+
# # For Xapian (requires the third-party install):
45+
# 'ENGINE': 'xapian_backend.XapianEngine',
46+
# 'PATH': os.path.join(os.path.dirname(__file__), 'xapian_index'),
47+
# }
3948
}

0 commit comments

Comments
 (0)