praktikum Aufgabe9

This commit is contained in:
Nadege
2019-12-10 14:35:40 +01:00
parent d1ac7586f7
commit cc1f99bb3c
4 changed files with 2 additions and 9 deletions
+16
View File
@@ -0,0 +1,16 @@
import django_eventstream
from channels.auth import AuthMiddlewareStack
from channels.http import AsgiHandler
from channels.routing import URLRouter, ProtocolTypeRouter
from django.urls import re_path
urlpatterns = [
re_path(r'^events/',
AuthMiddlewareStack(URLRouter(django_eventstream.routing.urlpatterns)),
{'channels':['notice']}),
re_path(r'',AsgiHandler)
]
application = ProtocolTypeRouter({
'http': URLRouter(urlpatterns)
})
+1 -1
View File
@@ -74,7 +74,7 @@ TEMPLATES = [
]
WSGI_APPLICATION = 'news.wsgi.application'
ASGI_APPLICATION = 'posts.routing.application'
ASGI_APPLICATION = 'news.routing.application'
# Database