This commit is contained in:
2025-07-15 19:28:43 +08:00
parent 3e4c207cfc
commit 872ec5f7af
3 changed files with 12 additions and 23 deletions

View File

@@ -20,7 +20,6 @@ from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from ninja import NinjaAPI
from .ws import Consumer
api = NinjaAPI()
@@ -35,8 +34,4 @@ apis = [
path("api/", api.urls),
]
urlpatterns = apis + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
ws_urlpatterns = [
path("ws/", Consumer.as_asgi()),
]
urlpatterns = apis + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)