Browse Source

Cleanup haystack connections.

master
Nick Sergeant 4 years ago
parent
commit
0b6072e3d3
1 changed files with 5 additions and 7 deletions
  1. +5
    -7
      settings.py

+ 5
- 7
settings.py View File

@@ -13,8 +13,7 @@ if 'DATABASE_URL' in os.environ:

if 'SEARCHBOX_SSL_URL' in os.environ:

es = urlparse(os.environ.get('SEARCHBOX_SSL_URL') or
'http://127.0.0.1:9200/')
es = urlparse(os.environ.get('SEARCHBOX_SSL_URL'))

port = es.port or 443

@@ -31,16 +30,15 @@ if 'SEARCHBOX_SSL_URL' in os.environ:
"http_auth": es.username + ':' + es.password
}

if 'HAYSTACK_URL' in os.environ:
else:
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': os.environ.get('HAYSTACK_URL'),
'INDEX_NAME': 'snipts',
},
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine'
}
}



ABSOLUTE_URL_OVERRIDES = {'auth.user': lambda u: "/%s/" % u.username}
ACCOUNT_ACTIVATION_DAYS = 0
ADMINS = (('Nick Sergeant', 'nick@snipt.net'),)


Loading…
Cancel
Save