0.0.123
This commit is contained in:
@@ -39,14 +39,13 @@
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// var i = 0
|
||||
window.onload = function (){
|
||||
let user_id = document.querySelector(".button_profile_header").dataset['userId']
|
||||
let url = `ws://localhost:8000/ws/socket-server/?user_id=${user_id}`;
|
||||
|
||||
const chatSocket = new WebSocket(url);
|
||||
}
|
||||
|
||||
url = `ws://localhost:8000/ws/socket-server/?user_id=${user_id}`;
|
||||
|
||||
const chatSocket = new WebSocket(url);
|
||||
|
||||
function sendMessageSocket (data) {
|
||||
chatSocket.send(JSON.stringify(data));
|
||||
}
|
||||
@@ -103,5 +102,4 @@ chatSocket.onmessage = function (e) {
|
||||
// // btn.reset()
|
||||
// })
|
||||
// }
|
||||
// let form = document.getElementById('form')
|
||||
|
||||
// let form = document.getElementById('form')
|
||||
@@ -8,12 +8,11 @@
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" rel="stylesheet">
|
||||
<script src='{% static "js/user_profile.js" %}'> </script>
|
||||
<script src='{% static "js/user_profile(boris).js" %}'> </script>
|
||||
<script src='{% static "js/check_new_messages.js" %}'></script>
|
||||
{# <script src='{% static "js/chat_sockets.js" %}'></script>#}
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="{% static 'css/ion.rangeSlider.min.css' %}">
|
||||
<script defer src='{% static "js/check_new_messages.js" %}'></script>
|
||||
|
||||
|
||||
|
||||
@@ -21,5 +20,6 @@
|
||||
|
||||
{% block content %}
|
||||
{% include 'blocks/b_user_profile.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
|
||||
<script src='{% static "js/jquery_v3_6_4.js" %}'> </script>
|
||||
<script>
|
||||
|
||||
var user_id = {{ user.id }}
|
||||
</script>
|
||||
|
||||
<script src='{% static "js/chat_sockets.js" %}'></script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user