test
@ -14,14 +14,15 @@ from channels.auth import AuthMiddlewareStack
|
|||||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||||
from channels.security.websocket import AllowedHostsOriginValidator
|
from channels.security.websocket import AllowedHostsOriginValidator
|
||||||
|
|
||||||
import room.routing
|
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings')
|
||||||
|
|
||||||
application = get_asgi_application()
|
asgi_app = get_asgi_application()
|
||||||
|
|
||||||
|
import room.routing
|
||||||
application = ProtocolTypeRouter({
|
application = ProtocolTypeRouter({
|
||||||
"http": get_asgi_application(),
|
"http": asgi_app,
|
||||||
"websocket": AllowedHostsOriginValidator(
|
"websocket": AllowedHostsOriginValidator(
|
||||||
AuthMiddlewareStack(
|
AuthMiddlewareStack(
|
||||||
URLRouter(
|
URLRouter(
|
||||||
|
@ -24,9 +24,8 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
SECRET_KEY = 'django-insecure-*9shuddjs^!i00=go!8a=^8bmdje*ex3dbj7hv2(((m^u3$lap'
|
SECRET_KEY = 'django-insecure-*9shuddjs^!i00=go!8a=^8bmdje*ex3dbj7hv2(((m^u3$lap'
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = False
|
||||||
|
ALLOWED_HOSTS = ['192.168.1.18', 'localhost', '127.0.0.1', '141.136.42.178']
|
||||||
ALLOWED_HOSTS = ['192.168.1.18', 'localhost', '127.0.0.1']
|
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
@ -178,8 +177,7 @@ USE_TZ = True
|
|||||||
|
|
||||||
STATIC_URL = 'static/'
|
STATIC_URL = 'static/'
|
||||||
|
|
||||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||||
|
|
||||||
|
|
||||||
MEDIA_ROOT = os.path.join(BASE_DIR)
|
MEDIA_ROOT = os.path.join(BASE_DIR)
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 677 B After Width: | Height: | Size: 677 B |
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 392 B |
Before Width: | Height: | Size: 560 B After Width: | Height: | Size: 560 B |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 655 B |
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 655 B |
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 436 B |