Update test project with HTTP endpoint

This commit is contained in:
Andrew Godwin 2016-03-20 14:31:32 -03:00
parent 4f8b297462
commit bea5b138ef
3 changed files with 18 additions and 3 deletions

5
testproject/README.rst Normal file
View File

@ -0,0 +1,5 @@
Channels Test Project
=====================
This subdirectory contains benchmarking code and a companion Django project
that can be used to benchmark Channels for both HTTP and WebSocket performance.

View File

@ -0,0 +1,5 @@
from django.http import HttpResponse
def index(request):
return HttpResponse("OK")

View File

@ -1,6 +1,11 @@
from django.conf.urls import include, url
from chtest import consumers
urlpatterns = []
from django.conf.urls import url
from chtest import consumers, views
urlpatterns = [
url(r'^$', views.index),
]
channel_routing = {
"websocket.receive": consumers.ws_message,