From c24caea9f3428f53641dc46ba014f5530c91d828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 27 Nov 2018 09:13:36 +0100 Subject: [PATCH] misc: give login view a list of visible blocks (#28370) --- src/authentic2/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/authentic2/views.py b/src/authentic2/views.py index 13c96d0f..061852d1 100644 --- a/src/authentic2/views.py +++ b/src/authentic2/views.py @@ -365,6 +365,8 @@ def login(request, template_name='authentic2/login.html', 'methods': rendered_forms, # new definition 'blocks': collections.OrderedDict((block['id'], block) for block in blocks), + 'visible_blocks': collections.OrderedDict( + (block['id'], block) for block in blocks if not block['is_hidden']), redirect_field_name: redirect_to, }) return render(request, template_name, context) -- 2.20.0.rc1