From 3deab54d64b8efc8f0142a4b4c0b5bf09725da24 Mon Sep 17 00:00:00 2001 From: Corentin Date: Sat, 2 Nov 2024 19:35:13 +0100 Subject: [PATCH] Fix bugs --- README.md | 2 ++ redis_app/views.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eb04c18..3dbc388 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,8 @@ The search looks for title, description and level fo the course. There's no adva Sometimes, I really don't know why, some message published does not appear at all to notifications page. It concerns around 20 % of all messages. +However, you can see my pub/sub system is well implemented by listening to all channels into redis-cli with `PSUBSCRIBE *`. It concerns my Django implementation. Sorry for this problem, but if you see the solution, please tell me. + ## Bugs If you see any bugs, please tell me. I really tried my best by testing every feature every time at every change, but I can miss some tricky things. So please, feel free to mail me at corentin.lemaire@etu.uca.fr to report any bug! diff --git a/redis_app/views.py b/redis_app/views.py index d1eddff..b10ffd9 100644 --- a/redis_app/views.py +++ b/redis_app/views.py @@ -103,6 +103,7 @@ def login_form(request): # Go back to login and remove the login person from the session def logout(request): request.session["person"] = "" + request.session["messages"] = [] return render(request, 'login.html', {'person': Person(name="", role="")}) # Displaying the courses page of a person @@ -551,7 +552,7 @@ def notifications(request): messages.insert(0, message) # Updating the new messages list to the session to display it to the notifications view. - request.session["message"] = messages + request.session["messages"] = messages return notifications_view(request) # Clearing the notifications (the session messages)