Index name for Haystack.

master
Nick Sergeant 2014-10-20 14:36:07 -04:00
parent 7cedbef7cb
commit 8b47cd27cc
2 changed files with 17 additions and 13 deletions

View File

@ -17,15 +17,18 @@ This is the codebase for the website, [Snipt.net](https://snipt.net/).
1. Clone the repo. 1. Clone the repo.
2. `heroku create` 2. `heroku create`
3. `heroku config:add DEBUG=True` 3. `heroku addons:add heroku-postgresql:standard-0`
3. `heroku config:add INTERCOM_SECRET_KEY=` 4. `heroku addons:add bonsai`
3. `heroku config:add POSTMARK_API_KEY=` 5. `heroku config:add DEBUG=False`
3. `heroku config:add RAVEN_CONFIG_DSN=` 6. `heroku config:add INTERCOM_SECRET_KEY=`
3. `heroku config:add SECRET_KEY=` 7. `heroku config:add POSTMARK_API_KEY=`
3. `heroku config:add STRIPE_SECRET_KEY=` 8. `heroku config:add RAVEN_CONFIG_DSN=`
4. `git push heroku` 9. `heroku config:add SECRET_KEY=`
5. `heroku run pip install --index-url https://code.stripe.com --upgrade stripe` 10. `heroku config:add STRIPE_SECRET_KEY=`
6. `heroku run python manage.py syncdb` 11. `heroku config:add USE_SSL=False`
7. `heroku run python manage.py migrate` 12. `git push heroku`
13. `heroku run pip install --index-url https://code.stripe.com --upgrade stripe`
14. `heroku run python manage.py syncdb`
15. `heroku run python manage.py migrate`
Any problems / questions / bugs, [create an issue](https://github.com/nicksergeant/snipt/issues). Thanks! :) Any problems / questions / bugs, [create an issue](https://github.com/nicksergeant/snipt/issues). Thanks! :)

View File

@ -7,6 +7,7 @@ if 'DATABASE_URL' in os.environ:
HAYSTACK_CONNECTIONS = { HAYSTACK_CONNECTIONS = {
'default': { 'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'INDEX_NAME': 'snipt',
'URL': os.environ.get('BONSAI_URL', ''), 'URL': os.environ.get('BONSAI_URL', ''),
}, },
} }
@ -35,7 +36,7 @@ AUTH_PROFILE_MODULE = 'accounts.UserProfile'
AUTHENTICATION_BACKENDS = ('utils.backends.EmailOrUsernameModelBackend',) AUTHENTICATION_BACKENDS = ('utils.backends.EmailOrUsernameModelBackend',)
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) BASE_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_PATH = os.path.dirname(__file__) BASE_PATH = os.path.dirname(__file__)
CSRF_COOKIE_SECURE = False CSRF_COOKIE_SECURE = os.environ.get('USE_SSL', False)
DEBUG = os.environ.get('DEBUG', False) DEBUG = os.environ.get('DEBUG', False)
DEFAULT_FROM_EMAIL = 'nick@snipt.net' DEFAULT_FROM_EMAIL = 'nick@snipt.net'
EMAIL_BACKEND = 'postmark.django_backend.EmailBackend' EMAIL_BACKEND = 'postmark.django_backend.EmailBackend'
@ -59,7 +60,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SEND_BROKEN_LINK_EMAILS = False SEND_BROKEN_LINK_EMAILS = False
SERVER_EMAIL = 'nick@snipt.net' SERVER_EMAIL = 'nick@snipt.net'
SESSION_COOKIE_AGE = 15801100 SESSION_COOKIE_AGE = 15801100
SESSION_COOKIE_SECURE = False SESSION_COOKIE_SECURE = os.environ.get('USE_SSL', False)
SITE_ID = 1 SITE_ID = 1
STATICFILES_DIRS = (os.path.join(BASE_PATH, 'media'),) STATICFILES_DIRS = (os.path.join(BASE_PATH, 'media'),)
STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder','django.contrib.staticfiles.finders.AppDirectoriesFinder',) STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder','django.contrib.staticfiles.finders.AppDirectoriesFinder',)
@ -69,7 +70,7 @@ TASTYPIE_CANNED_ERROR = "There was an error with your request. The site develope
TEMPLATE_DIRS = (os.path.join(PROJECT_PATH, 'templates')) TEMPLATE_DIRS = (os.path.join(PROJECT_PATH, 'templates'))
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
TIME_ZONE = 'America/New_York' TIME_ZONE = 'America/New_York'
USE_HTTPS = False USE_HTTPS = os.environ.get('USE_SSL', False)
USE_I18N = True USE_I18N = True
USE_L10N = True USE_L10N = True
USE_TZ = True USE_TZ = True