feat: Implement core support ticket system backend and WebSocket notifications

This commit is contained in:
poduck
2025-11-28 04:50:09 -05:00
parent 8dff4a592a
commit aa3854a13f

View File

@@ -0,0 +1,26 @@
import os
from django.core.asgi import get_asgi_application
# Fetch Django's ASGI application early to ensure the AppRegistry is populated
# before importing code that may import ORM models.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") # Use local settings for ASGI
django_asgi_app = get_asgi_application()
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from smoothschedule.tickets import routing as tickets_routing # Assuming we'll have tickets routing
application = ProtocolTypeRouter(
{
"http": django_asgi_app,
# Just HTTP for now. (We can add other protocols later.)
"websocket": AuthMiddlewareStack(
URLRouter(
tickets_routing.websocket_urlpatterns # Include ticket-specific WebSocket routes
)
),
}
)