Improve chat experience and begin search implementation
This commit is contained in:
15
app/asgi.py
15
app/asgi.py
@@ -13,4 +13,17 @@ from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
|
||||
|
||||
application = get_asgi_application()
|
||||
django_asgi_app = get_asgi_application()
|
||||
|
||||
|
||||
async def application(scope, receive, send):
|
||||
if scope.get("type") == "websocket":
|
||||
path = scope.get("path", "")
|
||||
if path == "/ws/compose/thread/":
|
||||
from core.realtime.compose_ws import compose_ws_application
|
||||
|
||||
await compose_ws_application(scope, receive, send)
|
||||
return
|
||||
await send({"type": "websocket.close", "code": 4404})
|
||||
return
|
||||
await django_asgi_app(scope, receive, send)
|
||||
|
||||
@@ -96,6 +96,7 @@ MIDDLEWARE = [
|
||||
]
|
||||
|
||||
ROOT_URLCONF = "app.urls"
|
||||
ASGI_APPLICATION = "app.asgi.application"
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
|
||||
26
app/urls.py
26
app/urls.py
@@ -30,6 +30,7 @@ from core.views import (
|
||||
manipulations,
|
||||
messages,
|
||||
notifications,
|
||||
osint,
|
||||
people,
|
||||
personas,
|
||||
queues,
|
||||
@@ -128,6 +129,26 @@ urlpatterns = [
|
||||
compose.ComposeSend.as_view(),
|
||||
name="compose_send",
|
||||
),
|
||||
path(
|
||||
"compose/drafts/",
|
||||
compose.ComposeDrafts.as_view(),
|
||||
name="compose_drafts",
|
||||
),
|
||||
path(
|
||||
"compose/summary/",
|
||||
compose.ComposeSummary.as_view(),
|
||||
name="compose_summary",
|
||||
),
|
||||
path(
|
||||
"compose/engage/preview/",
|
||||
compose.ComposeEngagePreview.as_view(),
|
||||
name="compose_engage_preview",
|
||||
),
|
||||
path(
|
||||
"compose/engage/send/",
|
||||
compose.ComposeEngageSend.as_view(),
|
||||
name="compose_engage_send",
|
||||
),
|
||||
path(
|
||||
"compose/thread/",
|
||||
compose.ComposeThread.as_view(),
|
||||
@@ -254,6 +275,11 @@ urlpatterns = [
|
||||
ais.AIList.as_view(),
|
||||
name="ais",
|
||||
),
|
||||
path(
|
||||
"search/<str:type>/",
|
||||
osint.OSINTSearch.as_view(),
|
||||
name="osint_search",
|
||||
),
|
||||
path(
|
||||
"ai/<str:type>/create/",
|
||||
ais.AICreate.as_view(),
|
||||
|
||||
Reference in New Issue
Block a user