Commit 2c11b2e4dfb8df061a5a186e8b0456d9fd08b373
1 parent
3c6db5fb
Exists in
master
and in
2 other branches
Modified context to interact with cookies
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
amadeus/context_processors.py
... | ... | @@ -11,7 +11,11 @@ def theme(request): |
11 | 11 | theme = Themes.objects.get(id = 1) |
12 | 12 | |
13 | 13 | context['theme'] = theme |
14 | - | |
14 | + if ("contrast_check" in request.COOKIES.keys()): | |
15 | + context ['contrast_cookie'] = True | |
16 | + else: | |
17 | + context ['contrast_cookie'] = False | |
18 | + | |
15 | 19 | return context |
16 | 20 | |
17 | 21 | def notifies(request): |
... | ... | @@ -48,4 +52,4 @@ def chat_notifies(request): |
48 | 52 | |
49 | 53 | context['chat_notifications_count'] = notifications |
50 | 54 | |
51 | - return context | |
52 | 55 | \ No newline at end of file |
56 | + return context | ... | ... |