From 8b47cd27cc68c89b1e11d7927edf7b91bfd4d485 Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Mon, 20 Oct 2014 14:36:07 -0400 Subject: [PATCH] Index name for Haystack. --- README.md | 23 +++++++++++++---------- settings.py | 7 ++++--- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 91f3bf9..b03e334 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,18 @@ This is the codebase for the website, [Snipt.net](https://snipt.net/). 1. Clone the repo. 2. `heroku create` -3. `heroku config:add DEBUG=True` -3. `heroku config:add INTERCOM_SECRET_KEY=` -3. `heroku config:add POSTMARK_API_KEY=` -3. `heroku config:add RAVEN_CONFIG_DSN=` -3. `heroku config:add SECRET_KEY=` -3. `heroku config:add STRIPE_SECRET_KEY=` -4. `git push heroku` -5. `heroku run pip install --index-url https://code.stripe.com --upgrade stripe` -6. `heroku run python manage.py syncdb` -7. `heroku run python manage.py migrate` +3. `heroku addons:add heroku-postgresql:standard-0` +4. `heroku addons:add bonsai` +5. `heroku config:add DEBUG=False` +6. `heroku config:add INTERCOM_SECRET_KEY=` +7. `heroku config:add POSTMARK_API_KEY=` +8. `heroku config:add RAVEN_CONFIG_DSN=` +9. `heroku config:add SECRET_KEY=` +10. `heroku config:add STRIPE_SECRET_KEY=` +11. `heroku config:add USE_SSL=False` +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! :) diff --git a/settings.py b/settings.py index bae3259..bc9bb95 100644 --- a/settings.py +++ b/settings.py @@ -7,6 +7,7 @@ if 'DATABASE_URL' in os.environ: HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', + 'INDEX_NAME': 'snipt', 'URL': os.environ.get('BONSAI_URL', ''), }, } @@ -35,7 +36,7 @@ AUTH_PROFILE_MODULE = 'accounts.UserProfile' AUTHENTICATION_BACKENDS = ('utils.backends.EmailOrUsernameModelBackend',) BASE_DIR = os.path.dirname(os.path.abspath(__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) DEFAULT_FROM_EMAIL = 'nick@snipt.net' EMAIL_BACKEND = 'postmark.django_backend.EmailBackend' @@ -59,7 +60,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SEND_BROKEN_LINK_EMAILS = False SERVER_EMAIL = 'nick@snipt.net' SESSION_COOKIE_AGE = 15801100 -SESSION_COOKIE_SECURE = False +SESSION_COOKIE_SECURE = os.environ.get('USE_SSL', False) SITE_ID = 1 STATICFILES_DIRS = (os.path.join(BASE_PATH, 'media'),) 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_DEBUG = DEBUG TIME_ZONE = 'America/New_York' -USE_HTTPS = False +USE_HTTPS = os.environ.get('USE_SSL', False) USE_I18N = True USE_L10N = True USE_TZ = True