Commit b89e69da by Chif Gergő

Create status app with default WebsocketConsumer

parent c89a8d41
from django.apps import AppConfig
class StatusConfig(AppConfig):
name = 'status'
# import json
# from asgiref.sync import async_to_sync
from channels.generic.websocket import WebsocketConsumer
class StatusConsumer(WebsocketConsumer):
def connect(self):
pass
def disconnect(self):
pass
def receive(self, text_message):
pass
from django.urls import re_path
from . import consumers
websocket_urlpatterns = [
re_path(r'ws/instance/(?P<vm_id>\w+)/$', consumers.StatusConsumer),
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment