mirror of
https://github.com/django/daphne.git
synced 2025-07-11 08:22:17 +03:00
Update test project with HTTP endpoint
This commit is contained in:
parent
4f8b297462
commit
bea5b138ef
5
testproject/README.rst
Normal file
5
testproject/README.rst
Normal 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.
|
5
testproject/chtest/views.py
Normal file
5
testproject/chtest/views.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from django.http import HttpResponse
|
||||||
|
|
||||||
|
|
||||||
|
def index(request):
|
||||||
|
return HttpResponse("OK")
|
|
@ -1,6 +1,11 @@
|
||||||
from django.conf.urls import include, url
|
from django.conf.urls import url
|
||||||
from chtest import consumers
|
from chtest import consumers, views
|
||||||
urlpatterns = []
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', views.index),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
channel_routing = {
|
channel_routing = {
|
||||||
"websocket.receive": consumers.ws_message,
|
"websocket.receive": consumers.ws_message,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user