websocket & change broker decimal to int

This commit is contained in:
2025-07-19 14:33:18 +03:30
parent 533461ba1a
commit c87204c134
10 changed files with 99 additions and 10 deletions

View File

@@ -7,10 +7,27 @@ For more information on this file, see
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
"""
# import os
#
# from django.core.asgi import get_asgi_application
#
# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Rasaddam_Backend.settings')
#
# application = get_asgi_application()
import os
from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application
from channels.auth import AuthMiddlewareStack
from apps.authentication.websocket import routing
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Rasaddam_Backend.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "your_project_name.settings")
application = get_asgi_application()
application = ProtocolTypeRouter({
"http": get_asgi_application(),
"websocket": AuthMiddlewareStack(
URLRouter(
routing.websocket_urlpatterns
)
),
})

View File

@@ -44,6 +44,8 @@ sentry_sdk.init(
profile_lifecycle="trace",
)
ASGI_APPLICATION = "Rasaddam_Backend.asgi.application" # noqa
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1',