From 53c483005186d35e4568170337c3145755ff449b Mon Sep 17 00:00:00 2001 From: Holger Trampe Date: Tue, 19 May 2020 22:59:07 +0200 Subject: [PATCH] csrf --- chat/templates/chat/chatmanagement.html | 13 ++- chat/views.py | 1 + .../__pycache__/settings.cpython-38.pyc | Bin 4750 -> 4750 bytes .../__pycache__/counter_tag.cpython-38.pyc | Bin 11379 -> 11669 bytes standards/templatetags/counter_tag.py | 17 +++- users/models.py | 11 +++ users/signals.py | 3 +- users/templates/users/base.html | 75 ++++++++++++++++-- users/urls.py | 1 + users/views.py | 7 ++ 10 files changed, 120 insertions(+), 8 deletions(-) diff --git a/chat/templates/chat/chatmanagement.html b/chat/templates/chat/chatmanagement.html index bb14ecc..8678f6e 100644 --- a/chat/templates/chat/chatmanagement.html +++ b/chat/templates/chat/chatmanagement.html @@ -69,7 +69,16 @@
-
+
{{user.first_name}} {{user.last_name}}
@@ -130,6 +139,8 @@ console.log(data); $( ".status-circle" ).each(function( index ) { if(data["onlineusers"].indexOf($(this)[0]["id"].split("_")[2]) !== -1){ + + console.log(data["onlineusers"][index+1]); $("#" + $(this)[0]["id"]).css("background-color", "green"); } else{ diff --git a/chat/views.py b/chat/views.py index 4fa3b54..0739a1f 100644 --- a/chat/views.py +++ b/chat/views.py @@ -52,6 +52,7 @@ def getloggedusersdata(request): for u in users_agency: if(u in users_online): user_online_final.append("" + str(u.pk)) + user_online_final.append("" + str(u.pk) + "_" + u.profile.onlinestatus) return JsonResponse({"onlineusers" : user_online_final}) else: diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index 8d6cd54230d87f99c6a87a29eee94b167b304932..bd1326b5449c70a4fedbe08821bb9ff32d671f7f 100644 GIT binary patch delta 19 YcmeBE?Nj9n<>lpK0D@^A8@XD904U4^82|tP delta 19 YcmeBE?Nj9n<>lpK00Kp)ja)54044APo&W#< diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc index 89ba1312a94f7a0695cf4b7f29f609a14253217e..3415ff3304729a876b23e2b13d5490a484c1a751 100644 GIT binary patch delta 336 zcmewyF*TYml$V!_0SNqDj>Pd8PUMqeG}@@G%q)^BlO>;$mXhAW(99U+o5CK
@@ -344,10 +346,29 @@