0.3.26
support chat v3
This commit is contained in:
@@ -13,8 +13,8 @@ register = template.Library()
|
|||||||
# @register.filter('get_msg_side')
|
# @register.filter('get_msg_side')
|
||||||
|
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
def get_ws_port():
|
def get_ws_address():
|
||||||
return settings.WS_PORT
|
return settings.WS_ADDRESS
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag
|
@register.simple_tag
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ TEMPLATES = [
|
|||||||
# WSGI_APPLICATION = 'TWB.wsgi.application'
|
# WSGI_APPLICATION = 'TWB.wsgi.application'
|
||||||
ASGI_APPLICATION = 'TWB.asgi.application'
|
ASGI_APPLICATION = 'TWB.asgi.application'
|
||||||
|
|
||||||
WS_PORT = 8000
|
WS_ADDRESS = 'localhost:8000'
|
||||||
|
|
||||||
CHANNEL_LAYERS = {
|
CHANNEL_LAYERS = {
|
||||||
'default': {
|
'default': {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
{#var user_id = {{ user.id }}#}
|
{#var user_id = {{ user.id }}#}
|
||||||
ws_url = `ws://localhost:{% get_ws_port %}/ws/socket-server/?user_id={{ user.id }}`;
|
ws_url = `ws://{% get_ws_address %}/ws/socket-server/?user_id={{ user.id }}`;
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user