From 2c11b2e4dfb8df061a5a186e8b0456d9fd08b373 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Sun, 30 Apr 2017 23:26:18 -0300 Subject: [PATCH] Modified context to interact with cookies --- amadeus/context_processors.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/amadeus/context_processors.py b/amadeus/context_processors.py index 47bd62e..5d158ff 100644 --- a/amadeus/context_processors.py +++ b/amadeus/context_processors.py @@ -11,7 +11,11 @@ def theme(request): theme = Themes.objects.get(id = 1) context['theme'] = theme - + if ("contrast_check" in request.COOKIES.keys()): + context ['contrast_cookie'] = True + else: + context ['contrast_cookie'] = False + return context def notifies(request): @@ -48,4 +52,4 @@ def chat_notifies(request): context['chat_notifications_count'] = notifications - return context \ No newline at end of file + return context -- libgit2 0.21.2