From 467be05baaec7c4c731e0d7ac3b91f578b7928ef Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sun, 8 Jan 2012 04:42:01 -0400 Subject: [PATCH] Select the proper web theme display mode based on the user authentication status --- apps/common/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/common/views.py b/apps/common/views.py index c88a204362..c7969ad5c3 100644 --- a/apps/common/views.py +++ b/apps/common/views.py @@ -193,8 +193,13 @@ def login_view(request): if LOGIN_METHOD == 'email': kwargs['authentication_form'] = EmailAuthenticationForm + + if not request.user.is_authenticated(): + context = {'web_theme_view_type': 'plain'} + else: + context = {} - return login(request, **kwargs) + return login(request, extra_context=context, **kwargs) def changelog_view(request):