From 3817d63468dcec58f8e1b8f17e9cc5280cc9907f Mon Sep 17 00:00:00 2001 From: Andrew Buss Date: Mon, 18 May 2015 23:16:25 -0700 Subject: [PATCH] added django websocket redis --- flashy/settings.py | 9 +++++++-- requirements.txt | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/flashy/settings.py b/flashy/settings.py index 3eead70..b94a49b 100644 --- a/flashy/settings.py +++ b/flashy/settings.py @@ -24,11 +24,14 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - + 'ws4redis', 'rest_framework_swagger', 'rest_framework', ] +WEBSOCKET_URL = '/ws/' + + MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', @@ -57,12 +60,14 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'django.core.context_processors.static', + 'ws4redis.context_processors.default', ], }, }, ] -WSGI_APPLICATION = 'flashy.wsgi.application' +WSGI_APPLICATION = 'ws4redis.django_runserver.application' DATABASES = { 'default': { diff --git a/requirements.txt b/requirements.txt index 83e6040..ac5676c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ #beautifulsoup4 Django>=1.8 -#django-websocket-redis==0.4.3 +django-websocket-redis #gevent==1.0.1 #greenlet==0.4.5 #redis==2.10.3 -- 1.9.1